Use IP camera with OPEN CV without internet connection (direct connection to pc) - camera

I am sorry, this might not be the correct platform to ask this kind of question but I couldn't think of any other place .
I for one of my project I need to capture some video footage from an outdoor camera using open cv. Actually, its a part of a bigger project where another signal triggers the camera. Since the camera will be located outside, I am looking for weather proof night vision enabled USB cameras that I can easily control via OPENCV. However I cannot find any descent USB camera and most of the websites show IP cameras. My problem is that the installation will be at a site where there is no internet so I cannot use internet. Can anybody please suggest if and how these IP cameras can be connected to the PC and be controlled via OPEN CV or else suggest some websites where I can get descent outdoor USB IR cameras.
I have also tried the NOIR Raspi camera but the quality is not very good and I think the range will also not be very good. Moreover running OPEN CV on RpI is very slow even for simple video recording.

Please refer to that thread for how to use IP cameras with open CV. I didn't try it personally, but a simple google search got me that. http://answers.opencv.org/question/133/how-do-i-access-an-ip-camera/

To access an IP camera is very simple, you just need this line:
cv2.VideoCapture("rstp://ipaddress:port/blahbla")
Now, if you dont have internet the IP camera as the PI should be on the same network, you can have a wireless router with no internet.
If you dont have a wireless router you can create a hotspot on your PI so you can connect the Camera directly to the PI, alot of IP cameras support hotspot so you can connect your pi to them.

Related

ToupTek XCAM4K8MPA camera connection to Linux computer

I'm trying to connect a ToupTek XCAM4K8MPA camera to a Linux Ubuntu 20.04 64-bit computer to use with their provided ToupLite software for microscopy image capturing. The camera comes with a USB 3.0 cable, HDMI cable and USB WLAN adapter.
I have managed to set up the ToupTek ToupLite software (Link to manual, Link to download page) which, as far as I understand, comes with the SDK included. I have then connected the camera via USB 3.0 and HDMI cable to the computer, but ToupLite shows No device as in, the camera is not recognized or connected. I have tested the camera by simply connecting it to a computer monitor via HDMI cable and it works, but for capture I would like it to be connected to a computer and the WLAN or Wi-Fi connection solution is not really a good option.
Perhaps someone has some ideas of what I am missing.
Note: Relevant tags include touptek, touplite, microscopy
I ended up using the WLAN connection. Made a non-changing IP address for the camera and the ToupLite software recognizes that it is on the local network.

Connecting to Multiple Cameras via Sony Remote Camera API

Using Sony Remote Camera SDK 2.1.2
I am not using any mobile devices to talk to my Sony cameras
I am using a Ubuntu, C++ and a router to access my Sony cameras
My Sony cameras WORK for one API call, they provide a response to the Sony Camera Remote API call "startLiveview" but that is the only Sony Camera Remote API call that the Sony cameras will respond to, I have tried "startLivewviewWithSize", "getSupportedLiveviewSize", "getLivewviewSize", and "getAvailableAppList", "getApplicationInfo", none of these API calls get a response from either of my Sony Cameras, in general, there is one exception see below
I have tried all these calls with only one Sony Camera on.
The exception: when I will actually get responses from the Sony Cameras. If I call "getAvailableAppList", this will cause something to happen to the Sony Camera, and I will start to get responses from it but only when the camera is in Wifi Live Preview mode
Now the Scenario:
I have two Sony HDR-AZ1 cameras, I have them both set to "Perform Live Streaming":
Currently, I am able to capture the Livepreview stream, recording it, using VLC PLayer and a Netgear Router where I assign static IP addresses to the cameras:
I have assigned the Sony Cameras in my LAN settings in my Netgear Router:
#define SONY_CAMERA_1 #"http://192.168.178.13:8080/sony/camera"
#define SONY_CAMERA_2 #"http://192.168.178.14:8080/sony/camera"
So I can capture the Liveview stream from two cameras because of the static IP addresses I have assigned with my router.
The Livepreview stream is always streaming, no API calls are sent to the camera, the static assigned IP addresses allow me to capture the stream using VLC Player to record the stream:
Now I am trying to figure out if I can use the Sony Remote Camera API with my static IP addresses to talk to multiple cameras. I have read online that it is possible and that it is not possible, yet I haven't found a clear statement on the fact one way or the other.
This Stackoverflow article would imply, via the last sentence of Sony's #Marlin-SONY's answer that it is possible, using the Sony Remote Camera API: Is there a way to send multiple wifi camera a signal to take a picture at the same time?
But Simon Wood's answer and code, along with other articles convey that multiple connection via Sony Remote Camera API is still a bit of an elusive unsolved issue.
With my static IP addresses, assigned at the router, I expect that I can do the following call:
http://192.168.178.13:8080/sony/camera
strCmd = "{"
"\"method\" : \"getApplicationInfo\","
"\"params\" : [],"
"\"id\" : 1,"
"\"version\" : \"1.0\""
"}".toJSON;
and get a response, but I never get a response, not matter what Wifi mode the camera is set to.
I assume I will need to switch the WiFi mode on the Sony HDR-AZ1 cameras to either just "WiFi" or "Wifi Multi Connection" instead of the "WiFi Perform Live Streaming" I currently have them set to be but even that is not clearly documented anywhere that I can find.
Can I connect to multiple cameras via the Sony Remote Camera API, I assume the answer is yes but my cameras are not acting as Wireless Access Points, do they still receive all documented Sony Camera Remote API calls when the the cameras are in some flavor of Wifi with static IP addresses assigned to them via my router?
What WiFi mode do my cameras need to be in to work with the Sony Remote Camera API? 1)Wifi, 2 Wifi Multi Connection (This seems to be only for the Sony Remote Control product) or 3) Wifi Livepreview?
Do I need to use my router to assign static IP addresses or can I use SSDP to find the cameras?
Have you tried looking at the CameraRemoteSampleApp sample code inside the Camera Remote SDK?
https://developer.sony.com/downloads/all/sony-camera-remote-api-beta-sdk/
There are examples of how to get the IP address for the cameras for both Android and iOS.
Edit: To answer your questions above the Sony Camera Remote API does not support connecting to multiple cameras from a single phone or via a router. It only supports the API over a direct WiFi connection 1:1 between a phone and a camera.
Not a direct answer for you, but if you'd like to play I had attempted detecting multiple cameras (but don't have appropriate hardware to test) in this project:
https://github.com/Bloodevil/sony_camera_api
The script 'src/examples/scan_for_cameras.py' will attempt to find all cameras bonded to local network/machine.
I'd be real interested in finding out whether it actually works ;-)
Cheers,
Simon.

Camera Remote API : Camera + iPad + PC?

I'm currently studying the Development Guide given with the Sony Camera Remote API beta SDK, and what I've understood so far, is that in order to send and receive messages between a camera and a mobile device, the smartphone or tablet should be connected through Wifi to the camera, which acts as an access point.
Actually, what I'd like to do after downloading a picture on the mobile device from the camera, is to pass it to a PC so that I will be able to print it and use it for other purposes. This process should be completely transparent and automatic for the final user.
Thus, my problem is that I need the mobile device to be connected, through Wifi, to both camera and PC.
The solutions I have in mind are :
Make the mobile device, and the PC, connect to the camera access point, so that they can be located on the same network.
Is this possible? I mean, can the Sony camera handle more than one client when acting as an access point? If yes, can I have a fixed IP for mobile device and PC so that I can easily make them exchange data?
Use a simple wifi router and make the camera, mobile device, and PC connect to this router.
Without acting as an access point (i.e. simple network client), can the camera be used with the remote control function?
If you guys see any other options, I'd be glad to read them !
Thanks,
Bertrand
Unfortunately, neither of your solutions would be supported. Only one device can be connected to the camera AP at a time, and the camera itself has to act as the access point (certain models support connecting to an access point from the camera but the Camera Remote API is not supported in this case).
If you don't need the mobile device to have access to the pictures, your best bet may be to directly connect the PC to the Camera and transfer the images using the API. The API is REST based so can be used on any platform.

Trying to make app to make my FFOS phone mic/webcam for desktop

I was doing research and couldn't get myself in the right direction so I figured I would ask if it's possible.
For my desktop computer I dont have a mic or a webcam but needed it for some applications.
So I thought to create an app for my Flame that when connected over USB will act as mic and webcam. Is this possible?
Yes you could use webRTC to connect PC & phone and share webcam/mic (either phone->PC or PC->phone). Try Firefox Hello if you want to see how webRTC works.
For example, try http://mozilla.github.io/webrtc-landing/ in both your device and desktop

connecting 2 Kinect sensors to my notebook

I am trying to connect 2 kinect sensors to my notebook. I know that I have to have at least 2 separate USB 2.0 controllers. According to tis website: LINK I have the same settings as in the picture. So I think that connecting 2 kinect sensors should be possible for me. I have 3 regular USB2 ports and one combined with e-SATA. So I have 4 ports to connect USB devices. However, when I try to connect 2 Kinect sensors (each time into different ports), I am always getting error message on one device (in windows device manager):
This device cannot start. (Code 10)
Can anyone help me please? I do not have any other computer and dont want to buy new just because USB controllers. I thing there has to be a way to do this. Thank you
can you please get a schematic of your notebook's motherboard and double check how your 3 ports are connected to the 2 controllers you mention. Hopefully 1 out of the 3 ports will be connected to a different controller from other 2 ports.
Does your notebook allow you to connect an express card to it ? Perhaps you could get an additional port this way.
With a custom built PC and a PCI Express USB expansion card we've got 3 kinects connected at the same time for an art-installation/robotics project.
I remember though at the time getting 2 Kinects running at the same time on my old 2008 macbook with no problems. Note that this was with either the libfreenect and OpenNI drivers, since the Kinect SDK driver doesn't work on osx.
Also, since you're using the Kinect SDK, I'm guessing you are using either Kinect for Windows (v1 if you will) or Kinect for Xbox360 and not the Kinect 2 for Windows since the current Alpha release of the SDK currently only allows a single sensor.
Update
Had a quick look here:
although couldn't easily find the schematics. My guess is two USB ports are connected to the same controller and the 3rd USB port might(don't take my word for it, check the manufacturers specs) be connected to a separate usb controller, in which case connecting one kinect to one side of your laptop and the other kinect to the port on the opposite should work. Make sure you see both sensors in Device Manager(run devmgmt.msc).
Also, just to double check your sensors as well, try connecting one, running a demo/test, then disconnecting and using a second sensor on the same port.
If both sensors work individually work on the same port, test them also on the usb port on the opposite side. You just want to make sure neither the sensors nor your ports are faulty. Lastly, if your hardware looks fine (power is good, sensors and ports are good), double check your code and me sure you don't accidentally open the same sensor twice or any other mistake that might be easy to miss.
If you have a friend you can either borrow another laptop for a short time just to test that would also be good. You can also try getting an USB Express Cardâ„¢ card for your laptop. Although a long shot, you could try to disable other usb devices on your laptop, leaving as much bandwidth available to the ports as possible. You should be able to do this either from Device Manager or your potentially from BIOS settings.