Community
cancel
Showing results for 
Search instead for 
Did you mean: 
SArgy
Beginner
1,757 Views

Get images from the OV7251 camera (bottom facing)

Following the guide in https://github.com/intel-aero/meta-intel-aero/wiki/06-Cameras-and-Video# take-a-photo-with-the-black-and-white-camera 06 Cameras and Video · intel-aero/meta-intel-aero Wiki · GitHub to access the OV7251 camera (bottom facing), I get the attached yuv420 Image.

However, the last command to convert the yuv420 raw image to jpeg using ffmpeg

ffmpeg -f rawvideo -s 640x480 -pix_fmt yuv420p -i Image-video<</span>*> test.jpg

does not provide a correct output image (see attachment for output).

The ffmpeg output is

ffmpeg -f rawvideo -s 640x480 -pix_fmt yuv420p -i Image-video2-640x480-0.yuv420 out-img.jpg

ffmpeg version N-83781-g3016e91 Copyright (c) 2000-2017 the FFmpeg developers

built with gcc 6.3.0 (GCC)

configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --

enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-li

bfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enabl

e-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolam

e --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable

-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib

libavutil 55. 48.100 / 55. 48.100

libavcodec 57. 82.102 / 57. 82.102

libavformat 57. 66.103 / 57. 66.103

libavdevice 57. 3.100 / 57. 3.100

libavfilter 6. 74.100 / 6. 74.100

libswscale 4. 3.101 / 4. 3.101

libswresample 2. 4.100 / 2. 4.100

libpostproc 54. 2.100 / 54. 2.100

[rawvideo @ 000000000036a1a0] Estimating duration from bitrate, this may be inaccurate

Input # 0, rawvideo, from 'Image-video2-640x480-0.yuv420':

Duration: 00:00:00.04, start: 0.000000, bitrate: 92569 kb/s

Stream # 0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 640x480, 92160 kb/s, 25 tbr, 25 tbn, 25 tbc

Stream mapping:

Stream # 0:0 -> # 0:0 (rawvideo (native) -> mjpeg (native))

Press [q] to stop, [?] for help

[swscaler @ 00000000003fe560] deprecated pixel format used, make sure you did set range correctly

Output # 0, image2, to 'out-img.jpg':

Metadata:

encoder : Lavf57.66.103

Stream # 0:0: Video: mjpeg, yuvj420p(pc), 640x480, q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc

Metadata:

encoder : Lavc57.82.102 mjpeg

Side data:

cpb: bitrate max/min/avg: 0/0/200000 buffer size: 0 vbv_delay: -1

[rawvideo @ 00000000003e44a0] Invalid buffer size, packet size 2048 < expected frame_size 460800

Error while decoding stream # 0:0: Invalid argument

frame= 1 fps=0.0 q=6.9 Lsize=N/A time=00:00:00.04 bitrate=N/A speed=0.366x

video:51kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

I believe the problem in the conversion is that the output image does not contain only the raw pixel values (otherwise it would be 640*480*1.5=460800 bytes, while it is 462848, hence the offset of 2048 that ffmpeg is complaining about).

Has anyone succeeded in converting images from the bottom facing camera?

Here is the output of my aero version:

aero@aero-CherryTrail:~$ sudo aero-get-version.py

BIOS_VERSION = Aero-01.00.13

OS_VERSION = Ubuntu 16.04.4 LTS"

AIRMAP_VERSION = unknown

FPGA_VERSION = 0xc2

AeroFC firmware version = 3.6.0

0 Kudos
5 Replies
idata
Community Manager
159 Views

Hello Savvas,

 

 

Thank you for your interest in the Intel Aero drone.

 

 

Your request has been received and is currently being investigated.

 

We will get back to you as soon as possible.

 

 

Regards,

 

Octavian

 

idata
Community Manager
159 Views

Hello Savvas,

 

 

We found the following community thread post with a similar error message.

 

/thread/120469 https://communities.intel.com/thread/120469

 

 

Can you please check it out and let us know if it was helpful?

 

 

Best regards,

 

 

Bogdan
SArgy
Beginner
159 Views

Hello Bogdan,

Thank you for the investigation of the issue and the reply.

This issue does not apply to my case; they refer to R200 (video13) camera, my issue is with the bottom facing OV7251 (video2)

I believe that the issue is with the quality of the images. I do get an image but the quality is bad, as you can see in my attached images in the original post.

Perhaps the video sensor is faulty or damaged. I would appreciate any advice on how to ensure it is a faulty camera before I ask for a refund.

Yun_W_Intel
Employee
159 Views

Hello,

Attached is a debug version of aero-optical-flow. It will output preview of OV7251 sensor to your local display. Please try this and see if you're still seeing the same distortions.

idata
Community Manager
159 Views

Hello sargyrop,

 

 

 

Can you tell me if you are still facing issues with converting images from the OV7251 bottom facing camera?

 

 

Thank you in advance,

 

Casandra
Reply