Go to advanced search

by wibble82
Fri Nov 01, 2013 10:55 am
Forum: Camera board
Topic: A c++ camera api
Replies: 35
Views: 24621

Re: A c++ camera api

Hi That suggests that its failing to find and open a shader file. Are all the .glsl files in the folder that you are running the application from? They should be if you just unzipped the file to a folder in your home directory and followed the instructions. Could you list here the exact actions you ...
by wibble82
Fri Nov 01, 2013 9:33 am
Forum: Camera board
Topic: A c++ camera api
Replies: 35
Views: 24621

Re: A c++ camera api

2 raspberry pis is the plan! http://2.bp.blogspot.com/-ovS28JgigMM/UmlgH9PUQRI/AAAAAAAAArM/ai_UsCCW4BA/s1600/picamerarig.jpg Once the gpu pipeline is nice and solid, I'll get some feature recognition in there, pull out the feature info from 2 raspberry pis and pipe it to a 3rd. That'll do feature ma...
by wibble82
Fri Nov 01, 2013 8:07 am
Forum: Camera board
Topic: A c++ camera api
Replies: 35
Views: 24621

Re: A c++ camera api

Enjoy! Oh, and fyi, first version of the gpu accelerated api should be ready by Monday! Looking forward to it (you aren't already using the GPU? Or you mean passing the data to OpenGL without using CPU?) I have your 16-image demo http://robotblogging.blogspot.com/2013/10/gpu-accelerated-camera-proc...
by wibble82
Thu Oct 31, 2013 8:18 am
Forum: Camera board
Topic: An efficient and simple camera API - ready for use!
Replies: 18
Views: 5818

Re: An efficient and simple camera API - ready for use!

Nice! We'll have to race - my latest build is 1280x960 colour at 15.5fps! Your turn :) p.s. If you're using mmal for that work, I'd highly recommend the vcl.resize component for doing the colour conversion gpu side. If you're using OMX directly, the eglrender component (which gets the image to an eg...
by wibble82
Thu Oct 31, 2013 8:12 am
Forum: Camera board
Topic: A c++ camera api
Replies: 35
Views: 24621

Re: A c++ camera api

Thanks for finding that one - it occured to me it was bound to cause some issues for people who had already called their userland folder something different. For people who already have a userland folder and don't want to rename it, the alternative solution is to go into CMakeLists.txt, and replace ...
by wibble82
Wed Oct 30, 2013 10:59 am
Forum: Camera board
Topic: An efficient and simple camera API - ready for use!
Replies: 18
Views: 5818

Re: An efficient and simple camera API - ready for use!

Oh I see - that makes sense. I'm going to have a go at using OMX for accessing camera data now so I can get stuff into those egl images. Let me know if you get that functionality into mmal, and I'll switch it over.

cheers

-Chris
by wibble82
Wed Oct 30, 2013 9:58 am
Forum: Camera board
Topic: An efficient and simple camera API - ready for use!
Replies: 18
Views: 5818

Re: An efficient and simple camera API - ready for use!

Out of interest, did he say why it was unsupported? Seems like an odd decision to make to me! Ideally any OMX components that can be exposed should be exposed - otherwise mmal is always going to play catchup, which would be a shame because its much better!
by wibble82
Tue Oct 29, 2013 7:01 pm
Forum: Camera board
Topic: An efficient and simple camera API - ready for use!
Replies: 18
Views: 5818

Re: An efficient and simple camera API - ready for use!

That said, for some reason I've had better performance using a shader to downsample. Might have been something to do with the resizer interferring with my use of opengl for general rendering. In my latest gpu code all I take from mmal is the yuv data, and I've ended up with significantly better perf...
by wibble82
Tue Oct 29, 2013 6:59 pm
Forum: Camera board
Topic: An efficient and simple camera API - ready for use!
Replies: 18
Views: 5818

Re: An efficient and simple camera API - ready for use!

The list in mmal is missing a few things - I do:

//create the camera component
status = mmal_component_create("vc.ril.resize", &resizer);
if (status != MMAL_SUCCESS)

The docs says "OMX.broadcom.resize" is the name, which failed, so I took a punt on vc.ril.resize and it worked!

-Chris
by wibble82
Tue Oct 29, 2013 6:40 pm
Forum: Camera board
Topic: An efficient and simple camera API - ready for use!
Replies: 18
Views: 5818

Re: An efficient and simple camera API - ready for use!

No prob! resizer took a bit of digging, but its existence was mentioned here:

http://www.jvcref.com/files/PI/document ... omponents/

Then I guessed at the actual name of the component in mmal. It's a handy link :)
by wibble82
Tue Oct 29, 2013 8:14 am
Forum: Camera board
Topic: is there a way to get from mmal to opengl texture
Replies: 47
Views: 14778

Re: is there a way to get from mmal to opengl texture

I think last time I looked I could find the mmal source, but no examples of how to actually create a component. Maybe they're buried deep in there somewhere, but it strikes me that an api not much more complex than: mmal_connect_port_to_omx_tunnel(bla) Could be written. One for later though I guess ...
by wibble82
Mon Oct 28, 2013 11:12 pm
Forum: Camera board
Topic: is there a way to get from mmal to opengl texture
Replies: 47
Views: 14778

Re: is there a way to get from mmal to opengl texture

Hey I was just thinking the other day when I looked into this. Isn't mmal just a wrapper around OMX? This thread makes me wonder if simply allowing the user to interface OMX with mmal would be a useful approach - it'd mean that if a feature hadn't been implemented yet in mmal we could revert to the ...
by wibble82
Mon Oct 28, 2013 11:04 pm
Forum: Camera board
Topic: GPU Accelerated Processing Of The Camera Feed
Replies: 10
Views: 9163

Re: GPU Accelerated Processing Of The Camera Feed

And.. just saw the link on your you tube post. Looks awesome!
by wibble82
Mon Oct 28, 2013 11:02 pm
Forum: Camera board
Topic: GPU Accelerated Processing Of The Camera Feed
Replies: 10
Views: 9163

Re: GPU Accelerated Processing Of The Camera Feed

Hello That's something I'll be very interested. I'm currently working in this robot: http://www.youtube.com/watch?v=O6XkH84JYjU At the moment the work resolution is 320 x 240 but I would like to use 640 x 480. The problem is the speed, it decreases a lot when using it. I'm using edge detection and ...
by wibble82
Mon Oct 28, 2013 9:55 pm
Forum: Camera board
Topic: multiple simultaneous encoding
Replies: 8
Views: 3090

Re: multiple simultaneous encoding

It's definitely possible. I would take the raspivid application as your basis, as it already does a continuous feed. Currently the raspivid application sets up the following layout: camera -> [preview port] -> video render -> [video port] -> h264 encoder -> [still port] -> nowhere! I suspect you cou...
by wibble82
Mon Oct 28, 2013 5:22 pm
Forum: Camera board
Topic: An efficient and simple camera API - ready for use!
Replies: 18
Views: 5818

Re: An efficient and simple camera API - ready for use!

Cool. I'm probably going to start looking at a gpu accelerated version 2 next anyway, so by then it'll be faster and furiouser!
by wibble82
Mon Oct 28, 2013 4:47 pm
Forum: Camera board
Topic: is there a way to get from mmal to opengl texture
Replies: 47
Views: 14778

Re: is there a way to get from mmal to opengl texture

@jamesh - awesome! Dom mentioned it on my blog - very excited. Maybe I'll hold off OMX for a few days then and see what happens @drhastings I had a blast at running the filters on full res images, but found at 720p the more complex filters (like 5x5 gaussian blur) started to hit framerate. That said...
by wibble82
Mon Oct 28, 2013 8:22 am
Forum: Camera board
Topic: is there a way to get from mmal to opengl texture
Replies: 47
Views: 14778

Re: is there a way to get from mmal to opengl texture

wow - on closer inspection that looks greater than great! Was going to have a go at writing it but that should work just with a few tweaks. I'm going to build it into another friendly camera api like my previous mmal based one - I'm guessing you'd have no issue with me sharing it around once done? -...
by wibble82
Mon Oct 28, 2013 7:27 am
Forum: Camera board
Topic: is there a way to get from mmal to opengl texture
Replies: 47
Views: 14778

Re: is there a way to get from mmal to opengl texture

Thanks - that looks great! I am currently copying to a buffer from mmal, then copying the pixels into a texture as you suggest. Performance isn't bad but it's frustratingly slow given the gpu can handle the image fine. I suspected ditching mmal and going straight to openmax might be the best approac...
by wibble82
Mon Oct 28, 2013 7:21 am
Forum: Camera board
Topic: An efficient and simple camera API - ready for use!
Replies: 18
Views: 5818

Re: An efficient and simple camera API - ready for use!

Hi there It should work fine with opencv - ultimately all it's doing if giving you the raw data to play with. I'd recommend looking at the sample and using the beginread+endread functions when copying into an opencv matrix. Performance is best when reading raw yuv data, but getting the rgb channel i...
by wibble82
Mon Oct 28, 2013 7:12 am
Forum: Camera board
Topic: GPU Accelerated Processing Of The Camera Feed
Replies: 10
Views: 9163

Re: GPU Accelerated Processing Of The Camera Feed

Should certainly help with performance! I'm going to do some fiddling with opencv next so will post something a bit more structured when its working. In terms of python, I had thought about it but I don't know a great deal about writing python extensions. Might be on the cards but not for a little w...
by wibble82
Sun Oct 27, 2013 6:50 pm
Forum: C/C++
Topic: How to control camera module from C++
Replies: 9
Views: 20477

Re: How to control camera module from C++

Might I also recommend this incredibly simple bit of code for saving images: http://lodev.org/lodepng/

Once you've got your raw data from the camera, lodepng provides just 1 function call to save it as a png. Not fast, but simple!
by wibble82
Sun Oct 27, 2013 5:54 pm
Forum: Camera board
Topic: egl_render, eglimage and MMAL_ENCODING_EGL_IMAGE
Replies: 4
Views: 1235

Re: egl_render, eglimage and MMAL_ENCODING_EGL_IMAGE

thanks Jamesh - like I say, it looks like it should be possible - there is am OMX component for writing to an egl texture, and mmal does have a format called 'egl_image'. I just don't know how to connect the 2 together :)
by wibble82
Sun Oct 27, 2013 5:52 pm
Forum: Camera board
Topic: GPU Accelerated Processing Of The Camera Feed
Replies: 10
Views: 9163

Re: GPU Accelerated Processing Of The Camera Feed

And with a bit more fiddling - at 15hz, 768x512:

Image

I think we're ready for feature detection!
by wibble82
Sun Oct 27, 2013 5:14 pm
Forum: Camera board
Topic: egl_render, eglimage and MMAL_ENCODING_EGL_IMAGE
Replies: 4
Views: 1235

Re: egl_render, eglimage and MMAL_ENCODING_EGL_IMAGE

Thanks - good to know it's liked :) If you are fiddling with stuff and want a hand with some of the more complex code give me a shout - I always like a tricky problem to solve.

Agree on the mmal side of things - I'm hoping an insider will read this post and chip in!

Go to advanced search