Working FPV Camera setup with realtime HUD

Firmware/software/electronics/mechanics
omwdunkley
Expert
Posts: 162
Joined: Thu Jun 06, 2013 9:56 pm
Location: Munich

Re: Working FPV Camera setup with realtime HUD

Post by omwdunkley » Tue Apr 15, 2014 11:08 am

Hi,

I use Ubuntu myself, no idea how windows handles cameras.
Some of the digitiser are supported by recent linux kernels, so you don't need any drivers. Just plug it in a usb 2 port (Ive had some issues with usb3...) and it should appear under /dev/videoX, where X starts from 0 and enumerates the video devices.

You can easily test to see if that is working by running vlc, pressing ctrl+c (goes to the capture gui), selecting /dev/videoX, (optionally selecting PAL/NTSC), and click start. This should then show your digitiser feed.

Once you know that is working, you can try to view the feed from a python/c++ program. Opencv provides some easy ways to query a video device - there are tons of examples flying around the internet. I added a GUI overlay for the client a while back. There I used pygame to get the camera feed. Feel free to copy/paste whatever from the corresponding forum post here / code here.

Thanks for posting here, keep us updated and good luck :)



Phasmicor
Beginner
Posts: 2
Joined: Tue Dec 24, 2013 4:06 pm

Re: Working FPV Camera setup with realtime HUD

Post by Phasmicor » Mon Apr 28, 2014 11:54 am

Just a random idea but would it work to take an arm out of the camera holder and rotate the camera 45 degrees, then fly it in X-mode so that you don't have a propeller obscuring the top of the image.

otto
Beginner
Posts: 19
Joined: Sat Dec 28, 2013 5:03 pm

Re: Working FPV Camera setup with realtime HUD

Post by otto » Mon Apr 28, 2014 7:26 pm

Phasmicor wrote:Just a random idea but would it work to take an arm out of the camera holder and rotate the camera 45 degrees, then fly it in X-mode so that you don't have a propeller obscuring the top of the image.
I have no experience personally, but I recall someone saying that rotating it 45 is worse.

omwdunkley
Expert
Posts: 162
Joined: Thu Jun 06, 2013 9:56 pm
Location: Munich

Re: Working FPV Camera setup with realtime HUD

Post by omwdunkley » Sun Mar 08, 2015 8:49 pm

Zicolator wrote:Hey omwdunkley,

I am a big fan of what you have done with the crazyflie so far.

I am trying to implement a live camera feed and hopefully some ROS and OpenCV algorithms using most of the same hardware as you. I had some problems with our transmitter initially (It may be too heavy or it might just draw too much current) and I still have video as well as crazyflie cut-outs at times (which may be related to the wifi in our school).

Right now, however, my main goal is to implement the camera feed in the GUI similar to what you have working. My questions regarding your solution are as follows:

1) What type of operating system are you using? (We are using the crazyflie virtual machine running on a PC with Windows 7)
2) If you are using the same setup, how did you get the video feed to go into the virtual machine? Is it necessary to move USBs over to the virtual machine and reinstall the digitizer software in the CF client?
3) Once the video is coming into the CF virtual machine, what do I need to do to place it in the GUI as you did?

To preface, I don't have much experience with live camera feeds, especially in ubuntu, but i would really like to get at least an elementary system working with the gui, even if it is not as extensive as your own.

Thanks,
Zicolator

Hi! Thanks for the kind words. Sorry it has taken me so long to respond..busy times :)

I was using Ubuntu and a USB digitiser that converter an analogue signal to a v4l2 camera exposued in ubuntu under /dev/video0. This is basically the same way a webcam would be registered so you can use any webcam like software. For example, open vlc, press ctrl+c, chose the camera path from the video device drop down, (optionally select PAL/NTSC as the video standard) and press play. The ROS usb_cam/gs_cam package should be able to output images over the ROS network too (if you want to use ROS).

OpenCV should be able to open /dev/video0 as a video path too. How you get it into a GUI...not sure what the obvious answer is there ;) Some qt stuff I guess - there should be some examples up and around somewhere. You could have a thread which captures images from the video stream using opencv (or use ROS instead) and then use qt signals/slots to update a widget - or something like that.

Good luck!

DaGuRu
Beginner
Posts: 15
Joined: Thu Jan 14, 2016 8:25 pm

Re: Working FPV Camera setup with realtime HUD

Post by DaGuRu » Thu Jan 14, 2016 8:29 pm

Hey I am doing school project involving FPV and the Crazyflie, I was wondering if you had any advice on hooking all of the hardware up together, also if you know anywhere other than fpv hobby where I can order the parts from it would be appreciated (some of them are out of stock on fpv hobby)

chad
Expert
Posts: 555
Joined: Sun Sep 28, 2014 12:54 am
Location: New York, USA
Contact:

Re: Working FPV Camera setup with realtime HUD

Post by chad » Thu Jan 14, 2016 11:58 pm

DaGuRu wrote:Hey I am doing school project involving FPV and the Crazyflie, I was wondering if you had any advice on hooking all of the hardware up together, also if you know anywhere other than fpv hobby where I can order the parts from it would be appreciated (some of them are out of stock on fpv hobby)
Hi! Welcome to the forum.

Are you using a Crazyflie Nano (1.0) or Crazflie 2.0? If it's a 2, you might want to checkout this thread and possibly this one, and finally this one as well.
Crazyflier - my CF journal...
4x Crazyflie Nano (1.0) 10-DOF + NeoPixel Ring mod.
3x Crazyflie 2.0 + Qi Charger and LED Decks.
Raspberry Pi Ground Control.
Mac OS X Dev Environment.
Walkera Devo7e, ESky ET6I, PS3 and iOS Controllers.

DaGuRu
Beginner
Posts: 15
Joined: Thu Jan 14, 2016 8:25 pm

Re: Working FPV Camera setup with realtime HUD

Post by DaGuRu » Fri Jan 15, 2016 5:53 pm

Thanks Chad!

I am using the Crazyflie 2.0 I will take a look for sure, One other quick question, I found this package on fpv hobby, http://www.fpvhobby.com/234-rtf-58ghz-c ... grams.html , was just wondering if it would be a good fit as it is a little different than the hardware that was used and the hardware used on this thread is out of stock(although it says it just needs to be plugged into the battery so im assuming all I would need other than that little package would be a digitiser and receiver for my PC ? )

Thanks for thee fast response as well!

Kadin907
Beginner
Posts: 1
Joined: Tue May 31, 2016 11:28 pm

Re: Working FPV Camera setup with realtime HUD

Post by Kadin907 » Tue May 31, 2016 11:34 pm

I have been working on a similar project for the Crazyflie 2.0. Here is a picture of my camera mount design for the 0.6g camera available on the FPV hobby website for the Crazyflie 2.0. If anyone is interested I am happy to provide the Solidworks files so you can print one yourself and or modify it to your liking. Please note that you must be using the wide angle lens for this mount to work correctly.
Attachments
PrototypeCameraMount2.JPG

Post Reply