Capturing an Image using mobile by IP camera with Raspberry Pi

Call for Price

Capturing an Image using mobile by IP camera with Raspberry Pi

SKU: Capturing an Image using mobile by IP camera with Raspberry Pi Category:

Description

ABSTRACT

Raspberry Pi has mostly used hardware to interface/working with the camera-based application. Mainly for Open CV (Open Computer Vision) based applications. As the Raspberry Pi beginner, without USB camera, we can also use our mobile camera to capture an image to process in Raspberry Pi using IP cam. So that USB camera is not needed, with also high resolution. But frame processing will be a little bit slow when compared to USB camera. The mobile which we gonna uses the camera should be connected with the same network at which the Raspberry Pi is connected so that it acts as Local IP to work on IP camera.

HARDWARE REQUIRED

  • Raspberry Pi
  • SD card
  • Power supply
  • VGA to HDMI converter (Optional)
  • Android Mobile

SOFTWARE REQUIRED

  • Raspbian Stretch OS      
  • SD card Formatter
  • Win32DiskImager (or) Etcher
  • IP webcam (Android application)

PYTHON LIBRARIES USED

  • urllib  
  • cv2
  • numpy
  • sys

CODE

import urllib
import cv2
import numpy as np
url=["http://192.168.1.6:8080/shot.jpg","http://192.168.1.65:8080/shot.jpg"] #if we use multiple IP camera mobile
while True:
    for i in url:
        imgPath=urllib.urlopen(i)
        imgNp=np.array(bytearray(imgPath.read()),dtype=np.uint8)
        img=cv2.imdecode(imgNp,-1)
	cv2.imwrite('champ.jpg',img)
        cv2.imshow("rahi",img)
        if ord('q') ==  cv2.waitKey(1): #To quit application by pressing q
            exit(0)

Additional information

Weight 0.000000 kg

Reviews

There are no reviews yet.

Be the first to review “Capturing an Image using mobile by IP camera with Raspberry Pi”

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.