4 years ago (2017-03-06)  Algorithm language |   First to comment  81 
post score 0 times, average 0.0

The graduation project is to do a measurement of the object's distance through a binocular camera, and then control the model car to avoid the near obstacles. Therefore, the image of the binocular camera mounted on the model car needs to be transmitted and sent to the computer for double. The distance measurement algorithm calculates the distance, and the computer sends the calculated result to the car. The car controls the direction of travel so as to avoid obstacles.The Pcduino development board is used on the car, the Ubuntu system is installed, the Arduino expansion board is externally inserted, and the hardware part of the car is connected. After binocular cameras bought from Taobao, the way to get binocular camera images using java cv is similar to that of monocular cameras.The difference is that in order to separate the binocular cameras, the resolution parameters in the code need to be set.

If you do not set any resolution, the effect is as follows:

Ubuntu using Java CV to get binocular camera images

Binocular camera screen

It is not familiar, we see this in a movie theater watching 3D movies without glasses.For developers, it's obviously not a good idea to mix two images together. You need to make the following settings in your code.

Because the resolution of the camera in the author's hands is 640,480, the resolution is changed to 1280480, and the picture can be successfully separated.

The effect after the picture is separated is as follows:

Ubuntu using Java CV to get binocular camera images

Binocular camera image separation

The code uses the java cv library. If it is a maven project, you need to configure the dependencies: Add in the project node in pom.xml:

More environment configurations can be accessed on the official javathv home page of Github.


This article has been printed on copyright and is protected by copyright laws. It must not be reproduced without permission.If you need to reprint, please contact the author or visit the copyright to obtain the authorization. If you feel that this article is useful to you, you can click the "Sponsoring Author" below to call the author!

Reprinted Note Source: Baiyuan's Blog>>https://wangbaiyuan.cn/en/by-using-java-cv-for-binocular-camera-image-under-ubuntu-2.html

Post comment


No Comment


Forget password?