The feeling of true love is a keeper.
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
  #16   Spotlight this post!  
Unread 08-10-2013, 20:01
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: Raspberry Pi + Camera Module = New Vision System?

I hate how the pi doesn't support any of the $2 cameras because of it's interface. Why can't the RPi foundation make the camera cheaper. $25 is a lot, especually when you can buy a better substitute at a lower price
  #17   Spotlight this post!  
Unread 10-10-2013, 21:19
thephpdev's Avatar
thephpdev thephpdev is offline
Registered User
AKA: Josh Larson
FRC #2502 (Talon Robotics)
Team Role: Programmer
 
Join Date: Mar 2012
Rookie Year: 2012
Location: Eden Prairie, MN
Posts: 16
thephpdev is an unknown quantity at this point
Re: Raspberry Pi + Camera Module = New Vision System?

You can help by checking out the github and making some example programs using OpenCV. It isn't very fast, and I am grasping for any spare time that I can spend on this. So if anyone is able to make good examples that are able to utilize any library that would be very helpful to teams.
  #18   Spotlight this post!  
Unread 14-10-2013, 22:25
thephpdev's Avatar
thephpdev thephpdev is offline
Registered User
AKA: Josh Larson
FRC #2502 (Talon Robotics)
Team Role: Programmer
 
Join Date: Mar 2012
Rookie Year: 2012
Location: Eden Prairie, MN
Posts: 16
thephpdev is an unknown quantity at this point
Re: Raspberry Pi + Camera Module = New Vision System?

Quote:
Originally Posted by yash101 View Post
Do you guys know of any cheap substitute to the raspberry pi camera, that doesn't use USB?
You can use the Camera Module that is $25.

As a status update, I started utilizing OpenCV and the UV4L driver to get a /dev/video0 input stream. Under 320x240 I got about 10-12 frames per second while processing and rotating the image (the pi wasn't oriented correctly for my setup), and about 3 FPS under 640x480.

The goal was to find mini retro-reflective targets that resembled the targets from last year. The algorithm was converting to HSV, thresholding, then searching for contours. From there I filtered out the bad polygons and I was left with (mostly, occasionally I would get the outlier) my two targets.
  #19   Spotlight this post!  
Unread 28-10-2013, 16:54
thephpdev's Avatar
thephpdev thephpdev is offline
Registered User
AKA: Josh Larson
FRC #2502 (Talon Robotics)
Team Role: Programmer
 
Join Date: Mar 2012
Rookie Year: 2012
Location: Eden Prairie, MN
Posts: 16
thephpdev is an unknown quantity at this point
Re: Raspberry Pi + Camera Module = New Vision System?

I think this is a good time to give another update on my status of the project. Using a C++ V4L interface, I was able to get raw data incredibly fast using a low-level I/O read from a UV4L driver (/dev/video0). From there I made a Mat in OpenCV and thresholded the image, and then located the contours in the image. From there I did some filtering based on two factors: Contour Area, and "Rectangularity." From there I was mostly left with just my vision targets, and I was streaming 320x240 at 30FPS with some idle time, and 640x480 at 12FPS with no idle time (lots of processing done on these raw images).

That isn't where I stopped though, I also went on to make an android app to help calibrate the vision system based on different lighting environments. In order to do this, I chose to make an http server on the raspberry pi with a c++ library (libmicrohttpd) and set brightness, threshold, and contour area values as well as requesting images (PNG).
  #20   Spotlight this post!  
Unread 28-10-2013, 20:36
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Arrow Re: Raspberry Pi + Camera Module = New Vision System?

Great job. Keep up the progress!
  #21   Spotlight this post!  
Unread 12-11-2013, 21:04
Corvo's Avatar
Corvo Corvo is offline
Registered User
FRC #2846 (Fire Bears)
Team Role: Programmer
 
Join Date: Oct 2012
Rookie Year: 2011
Location: Roseville Mn
Posts: 5
Corvo is an unknown quantity at this point
Re: Raspberry Pi + Camera Module = New Vision System?

Can we get some documentation on your api?
__________________
I think I broke it
  #22   Spotlight this post!  
Unread 24-11-2013, 20:03
thephpdev's Avatar
thephpdev thephpdev is offline
Registered User
AKA: Josh Larson
FRC #2502 (Talon Robotics)
Team Role: Programmer
 
Join Date: Mar 2012
Rookie Year: 2012
Location: Eden Prairie, MN
Posts: 16
thephpdev is an unknown quantity at this point
Re: Raspberry Pi + Camera Module = New Vision System?

Updated Github and added the classes for the fast reading from the camera. I made it easy to choose the method for how you would like to capture, I would recommend using MMAP because it is much more efficient. I also added an example and documentation to RaspiVid and VideoBuffer so it should be much easier to learn how to use it.

I'm going to work on modifying the README so that it has some possible issues and solutions along with how to use the library.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:26.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi