User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13395
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: Camera competition winners' thread

Sun Apr 14, 2013 4:33 pm

remember to use sudo to edit the files in /boot, as files in this directory are protected, and you need super user rights to edit them!

aframe
Posts: 43
Joined: Tue Oct 30, 2012 10:03 am

Re: Camera competition winners' thread

Sun Apr 14, 2013 6:12 pm

bspratt wrote:
MATT227 wrote:I added what I needed to and it still comes up as "failed to create camera component"
Maybe AFrame can help....
Sorry guys, I've been away for a couple of days (sunny Sunderland!).

This is what worked for me, but it was only on a Rev1 Model B:

1. Download the most recent version of Wheezy.
2. Write that to an SD card.
3. Boot off the new image.
4. Expand the FS using the standard raspi-config option.
6. Edit the network_interfaces and wpa_supplicant.conf to enable wifi (optional - leave this if you're happy on ethernet).
7. Reboot.

Run these commands one after the other:
8. sudo apt-get update
9. sudo apt-get upgrade (took me about 30+ mins)
10. sudo apt-get install git-core
11. sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update
12. sudo chmod +x /usr/bin/rpi-update
13. sudo nano /boot/config.txt
13.1. add "start_file=start_x.elf" (no quotes)
13.2. add "start_fixup=fixup_x.dat" (no quotes)

14. Run /opt/vc/bin/raspicam -o filename.jpg

That is exactly the sequence that I ran through.

Hope it helps you guys.

I'm just doing some CAD at the moment to get the camera and some cases stuck on thingiverse.

If I add some standard files to thingiverse does anyone fancy doing any API work to customise them?

andygrove
Posts: 2
Joined: Sun Apr 14, 2013 6:55 pm

Probably a silly question

Sun Apr 14, 2013 7:00 pm

I received my camera module on Friday and have been getting it working this morning. I performed a clean install of wheezy on a new SD card and ran through the instructions including adding those two lines to the config.txt file. After this I do have my camera working so that's a good start :D

I haven't seen anyone else ask about this, but it looks like there is a protective film on the camera lens with a green tab which is just begging me to pull it off, but I don't want to do this to find out that it is a functional component of the camera. Should I remove this?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27458
Joined: Sat Jul 30, 2011 7:41 pm

Re: Camera competition winners' thread

Sun Apr 14, 2013 9:32 pm

I don't have a green tabbed film on mine, so I guess you need to remove it!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

aframe
Posts: 43
Joined: Tue Oct 30, 2012 10:03 am

Re: Camera competition winners' thread

Sun Apr 14, 2013 10:09 pm

It's just a bit of protection for the lens. Rip it off!

andygrove
Posts: 2
Joined: Sun Apr 14, 2013 6:55 pm

Re: Camera competition winners' thread

Sun Apr 14, 2013 11:15 pm

Awesome.. protective tab removed.

So far, I do have facial recognition working from Python by just calling the raspicam app in a loop then analyzing the image file. Very low tech and slow, but it works and will allow me to get my project working. It takes about 2.5 seconds to capture and process each frame.

If anyone is interested, the code is here:

https://github.com/andygrove/rasp_pi_camera_opencv

So what is the plan for doing this "properly"? I saw talk about developing a special driver for use with OpenCV but I was wondering how effective it would be if I just hacked the raspicam source and put opencv calls in there without persisting the image to disk. I wonder if I would get an acceptable frame rate? I guess I could try it out and see.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27458
Joined: Sat Jul 30, 2011 7:41 pm

Re: Camera competition winners' thread

Mon Apr 15, 2013 6:54 am

You'll be spending quite a bit of time just writing to the SD card. If you have the Raspi code (which is what its there for!) you could easily ad CV calls. I deliberately made the software as easy as I could so people could rip chunks out and use them for other tasks.

I still need to knock up some C libraries so people can get away form the command line.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

MattWherry
Posts: 3
Joined: Fri Apr 12, 2013 6:09 pm

Re: Camera competition winners' thread

Fri Apr 19, 2013 7:43 pm

Well. I spent most of tonight rebuilding my pi from the december Raspian edition as referred from the quick start - despite all the excellebt help from Brian and Jamesh, I am still not worrying the monkeys of the household. Their privacy, it appears, remain intact.

Well - looks like it is back to the shed, the pi being for tomorrow....

User avatar
jbeale
Posts: 3736
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: Camera competition winners' thread

Fri Apr 19, 2013 9:39 pm

I don't have any knowledge of the code involved, but is it possible that camera failure could be a hardware thing- eg. marginal power supply (OK for R-Pi on its own, but not enough current for R-Pi + camera) ? If that hasn't already been ruled out, a test would be to try with another power supply and another microUSB cable, if they are separate. Also, a voltage check on TP1-TP2 points on the R-Pi board, in case of a high-resistance power input fuse F3 with excessive voltage drop.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27458
Joined: Sat Jul 30, 2011 7:41 pm

Re: Camera competition winners' thread

Sat Apr 20, 2013 7:58 am

Definitely a possibility. The camera pulls up to 200mA when capturing according to my power supply (not accurate, but a good indicator)
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

bspratt
Posts: 16
Joined: Mon Apr 08, 2013 10:37 pm

Re: Camera competition winners' thread

Mon Apr 22, 2013 12:15 am

bspratt wrote:I'm going to take on the V4L work (I don't have the relevant experience either, but that never stops me). I'm completely new to RPi (but not linux), can you point me at the repo you reference, with the docs etc? Or were you just thinking google? I don't mind spelunking but I figure you've already put a little thought into this. Thanks. (Camera arrived yesterday, thanks!)
OK, after quite a bit of research I'm becoming convinced that V4L isn't the way forward. It appears to me that trying to implement a V4L driver with OpenMax is like trying to mate a zebra and a horse - you'd think it would be possible but no, they're genetically incompatible. The main problem as I understand it is that the bits of OMX that you can actually get at are userspace, and V4L is kernelspace. I expect it *could* be done but I think it would be pretty hacked up and not useful from a performance point of view.

So, while a V4L driver would cast the widest net as regards compatibility with off-the-shelf code, I think my efforts might be better targeted as making OpenCV play well with OMX or MMAL.

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1610
Joined: Sat Sep 10, 2011 11:43 am

Re: Camera competition winners' thread

Mon Apr 22, 2013 5:36 am

No you're right,

But we could put the MMAL interface into the V4L driver, that is much simpler than the OpenMaxIL interface and lends itself to porting into the kernel much easier. (There is a kernel level vchiq interface so you shouldn't need to come back down to user space to do it)

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

bspratt
Posts: 16
Joined: Mon Apr 08, 2013 10:37 pm

Re: Camera competition winners' thread

Mon Apr 22, 2013 5:59 am

Sounds promising - I had though MMAL was a wrapper on the userspace OMX stuff. I'll have to keep spelunking the code, clearly I don't have my head around this yet. Thanks for bearing with me!

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27458
Joined: Sat Jul 30, 2011 7:41 pm

Re: Camera competition winners' thread

Mon Apr 22, 2013 6:39 am

I was looking at V4L in some spare time Friday, and MMAL is the way to go in the V4L driver I reckon.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1610
Joined: Sat Sep 10, 2011 11:43 am

Re: Camera competition winners' thread

Mon Apr 22, 2013 11:35 am

MMAL is actually a simpler interface to the underlying OpenMax components (i.e. the video decode component) which makes the interfacing much easier (and far more reliable / debuggable)

That way the components should be easier to patch through the V4L interface

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

nerobot
Posts: 1
Joined: Wed Jun 05, 2013 12:28 pm

Re: Camera competition winners' thread

Wed Jun 05, 2013 12:34 pm

Hi all,

Sorry about the delay in writing this. It might seem like I've not done anything with the camera I was given.

I received the camera just before travelling to Uganda and have only just come back. As I was travelling soon after it's arrival, I quickly followed the instructions, but was unable to get it working. However, I took my Pi and camera with me hoping that I would be able to get it working.

During this time, I tried a number of solutions posted here, but just couldn't get it working. However, due to bad internet connection, I was unable to perform the update mentioned, so thought I would wait till I got back to the UK.

Unfortunately, my Pi got damaged during transport, so I've been unable to try again. I'm currently waiting for my new Pi to be delivered to try again. However, I image my input is probably too late. Since I wasn't able to use the camera for what I initially stated, I'm happy (though reluctant :D ) to send it back if desired.

I have however, been able to get the Pi working on a different medical equipment based project, details of which I'll send out in the near future.

Return to “Camera board”