IP_CAMERA
-
Upload
nguyen-van-phuc -
Category
Documents
-
view
29 -
download
0
description
Transcript of IP_CAMERA
-
CameraConnectionGuideCOMSW4733
Thisguidehasfourparts:1) Howtoconfiguretherouter2) Howtoconfigurethecamera3) HowtopowerthecamerafromtheiRobotCreatebattery4) HowtocaptureandeditanimagefromthecamerainMATLAB
TPLINKTLWR720NRouter
LinksysWVC80NCameraUserGuide:http://downloads.linksys.com/downloads/userguide/WVC80N_V10_UG_NCWEB,1.pdf
EasyNFM136CameraUserGuide:http://www.easyn.com/download/FS%20Quick%20Installation%20Guide.pdf
-
Part1:ConfiguretheRouter
a) Plugtherouterin.b) Connecttothatwirelessnetwork,ordirectlytotherouterviaethernet.c) Goto:http://tplinklogin.net/.(IfyoudonotseetheTPLINKdashboardandinsteadseesome
randomwebpage,pleasemakesureyouareconnectedtoyourrouterandnotsomeotherwirelessnetwork)
d) TheveryfirsttimeyouconfiguretherouteryoushouldrunthroughQuickSetupunderBasicSettings.ThiswillrequireyoutoconnecttheroutertotheinternetusingtheblueWANportontheback.
i. AutoDetectLettheRouterautomaticallydetecttheconnectiontypeyourISPprovides.
ii. EnableSecurity,andsetapassword.
e) TakenoteofyourpasswordandSSIDfortherouter.Thecameraneedsthisinformationinordertobeabletoconnecttotherouter.
-
Part2:ConfigureyourCamera
a) Connectthecameratotherouterviaanethernetcableandpoweriton.b) DeterminethecamerasMACaddressandcurrentIPaddress:
-
c) EnterthatIPaddressinyourbrowser.Youwillneedtologinwiththedefaultcamerausernameandpassword.Iftheseappeartobesettosomethingotherthatfactorydefault,thenfindtheresetbuttononthecameraanduseapapercliptoholditdownfor30secondswhilethecameraispoweredon.
i. LinksysCamera:EnterIPaddress(ex:http://192.168.0.101)thenclickadvanced
configurationandmakesureyoucanlogin.
ii. EasyNCamera:EnterIPaddresswithport81(ex:http://192.168.0.102:81).SignintoServerPushMode.
d) Verifythatyoucancaptureanimagefromthecamera
i. LinksysCamera:http://[INSERTIP_ADDRESS]/img/snapshot.cgi?
ex:http://192.168.0.102/img/snapshot.cgi?
ii. EasyNCamera:http://[INSERTIP_ADDRESS]/snapshot.cgi? ex:http://192.168.0.101:81/snapshot.cgi?
Note:theEasyNcamerausesport81,whiletheLinksyscamerausesdefaultport80.
e) GivethecameratheSSIDandpasswordforyourwirelessrouter.JustlikeyouneedtheSSIDandpasswordtousetherouterwirelessly,yourcameraneedsitaswell.
-
f) Turnoffthecamera,unplugtheethernetandturnthecamerabackon.
g) Verifythatthecameraisabletoconnecttotheinternetwirelesslybygoingtohttp://tplinklogin.net/andlookingunderDHCPclientscheckingthatyourcameraislisted.
-
h) Verifyyoucancaptureanimagewirelessly
i. LinksysCamera:http://[INSERTIP_ADDRESS]/img/snapshot.cgi?
ex:http://192.168.0.102/img/snapshot.cgi?
ii. EasyNCamera:http://[INSERTIP_ADDRESS]/snapshot.cgi? ex:http://192.168.0.101:81/snapshot.cgi?
Note:theEasyNcamerausesport81,whiletheLinksyscamerausesdefaultport80.
i) ReserveanIPaddressforyourcamera
i. GotoDHCP>AddressReservationConfigureroutertoalwaysassignaspecificIPforyourcamerasMACaddress.ThiswayyoucanhardcodetheIPandnothavetoworryaboutitchangingeverytimeyouturneverythingbackon.
Ifthishasbeendonecorrectly,afterrebootingyourrouterifyougotoDHCPClientsList,yourcamerasIPshouldbemarkedaspermanent:
-
j) DisableDDNSandUPnP
i. LinksysCamera:UnderOptionsmakesureDDNSandUPnParebothdisabled
ii. EasyNCamera:UnderUPnPsettingsmakesureUsingUPnPtoMapPortisNOTchecked.andunderDDNSServiceSettingsmakesureDDNSServiceisNone.
Part3:PoweryourCamerausingtheRobot'sBluetoothAdapterModuleToconnecttheblackpowersupplyboxtotheBluetoothAdapterModule(BAM),plugtheredwireintotheVpwslotonthefrontoftheBAMandtheblackwireintothegroundpinasillustratedinthefigurebelow.
-
Part4:CapturingandEditingImagesusingMATLAB
1) Readinganimagefromthecamera:
Youshouldbeabletocaptureanimagefromthecamerausingthesameurlsthatwereenteredintothebrowser:
%linksyscamera:%example:image=%imread('http://192.168.0.102/img/snapshot.cgi?)image=imread('http://[IP_ADDRESS]/img/snapshot.cgi?)%easyncamera:%example:image=%imread('http://192.168.0.101:81/snapshot.cgi?)image=imread('http://[IP_ADDRESS]/snapshot.cgi?)
-
Wehavehadissueswheretheaboveurlsworkedinthebrowser,butnotthroughMATLAB,ifthisisthecase,thenpassthecamerasusernameandpasswordaspartoftheurlinordertocaptureanimage:
image=imread('http://[IP_ADDRESS]/snapshot.cgi?user=admin&pwd=&resolution=16&rate=0')
2) DisplayacapturedImage:
imshow(image)
3) Indexlayersonanimage
red_layer=image(:,:,1)green_layer=image(:,:,2)blue_layer=image(:,:,3)
-
4) Findtheresolutionoftheimage
resolution=size(image)resolution=resolution(1:2)
5) ConvertanRGBimagetoGrayscale
gray_image=rgb2gray(image)
6) Drawonanimage
draw_image=imagedraw_image([50:100],[50:100],:)=0