Resize JPG Image Size w/ RLP & Cobra

This is more of a question then an actual problem. I have a project that Im currently working on that connects a Cobra (development system) thru USB host to a Canon camera. I have C# USB code written to control the camera and works great; however, Im looking to display the output from the cameras live view mode on the Cobras 320 x 240 screen.

The camera puts out an image sized at 1024 x 680 at about 30 frames a second thru USB, so obviously I need to rescale it down to 320x 240 to display on the Cobras screen. My question is, do you think it would be feasible to do the rescaling in RLP?

Also Ive been researching native C code to do the rescaling and this is proving to be a challenge to find, any direction on this would be appreciated.

The code internally that handles images is already native. RLP will not make it faster. You are simply asking too much from a 72Mhz processor.

Did you actually try it using managed code? I can imagine that 30FPS is too much, but maybe you could drop 59frames f.e. and only show an image each 2 seconds?

To give you a better background of my project. I started out wanting to make a GUI driven camera remote based on an embedded system with a USB host programmed in C#, and then I found the Cobra. Great device and I love it. Well as I built my USB code to control the camera it dawned on me that if I could present the live view images on the screen, it would make it a true view remote. This would be great as Im 6’ 4" tall and I do a lot of nature macro photography most of which I’m usually in awkward positions; thus my need for an extendable viewable remote.

That said, I thought Id ask first then to spin my wheels on attempting RPL coding. Gus is right asking too much from a small processor, but hey it was worth a shot. BTY, as I’ve got the image in a bit array coming from the camera, is there a function that can change the JPG size down to 320x240?

WourterH, its still noteworthy that I could display an image for focusing and composition purposes.

Thanks for your insight, much appreciated. - KG

There might be specialized hardware that can do it; the DSP functions of the Cortex-M4 might be helpful, I don’t know, I’ve never implemented JPEG decoding/encoding and scaling.

An FPGA could certainly handle it, but that’s a whole other world.

indeed, I was thinking on a small netbook running the cameras software :slight_smile:

Instead of resizing, why not skipping the pixels?
So that if you have 1200 width and want to display on 320 screen, just draw 1 pixel and skip 3 pixels
You could make a RLP function that gets the Bitmap/buffer and updates the screen in a similar manner.
It would be faster but I don’t think 60 fps is achievable.