jannewmarch
Posts: 33
Joined: Thu Jan 17, 2013 12:45 am

Reading an image using OMX.broadcom.image_read

Tue Sep 02, 2014 12:21 pm

Has anyone succeeded in reading an image using the OMX.broadcom.image_read component? It has one (output) port that I have disabled, but when I ask to transition to Idle state I get an OMX_ErrorInsufficientResources event and it stays in Loaded state. The URL I am using is a relative local file "image.jpg" using "OMX_IndexParamContentURI: The filename containing the image file can be specified using this parameter". I have malloc'ed an OMX_PORT_PARAM_TYPE with extra space for the URL which I have copied into param_image->contentURI. I haven't done any settings on the output port, waiting for OMX_EventPortSettingsChanged event to occur first - but I never get that far.

kwasmich
Posts: 2
Joined: Tue Sep 19, 2017 5:57 pm

Re: Reading an image using OMX.broadcom.image_read

Tue Sep 19, 2017 6:24 pm

I recently started to mess around with OpenMAX and got stuck with the same problem. There are code samples out there that encode or decode images in memory using OpenMAX but so far no-one uses image_read. Did you have any success, yet?

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4446
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Reading an image using OMX.broadcom.image_read

Tue Sep 19, 2017 8:05 pm

image_read isn't going to work, and I'm surprised if it is actually in the build. (I'll look at removing it tomorrow if it is).

When the chip was used as a co-processor there was a mode where it could also act as the main processor too, and that is the mode that image_read (and image_write) were intended for.

With the Pi the GPU has no direct access to the SD card or other storage, so it can't directly read the image data. You need to be looking at image_decode and passing in the source data via buffers.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

kwasmich
Posts: 2
Joined: Tue Sep 19, 2017 5:57 pm

Re: Reading an image using OMX.broadcom.image_read

Wed Sep 20, 2017 6:28 pm

Thanks for the clarification.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4446
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Reading an image using OMX.broadcom.image_read

Mon Oct 09, 2017 9:49 am

Just FYI, it wasn't quite the tomorrow, but read_media, write_media, write_still, image_read, and image_write have now been removed from the latest firmware (rpi-update, not apt-get) and the IL documentation. (Only niggle is that the documentation HTML files didn't get deleted from https://github.com/raspberrypi/firmware ... components, but they aren't referenced anymore).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “OpenMAX”

Who is online

Users browsing this forum: No registered users and 1 guest