Image captured by opencv is not good as normal.

asked 2015-06-27 12:54:39 -0500

updated 2015-06-27 12:56:46 -0500

I have captured two images, one by opencv Image captured by Opencv

another one by these command lines,

v4l2-ctl --set-fmt-video=width=640,height=480,pixelformat=3
v4l2-ctl --stream-mmap=3 --stream-count=1 --stream-to=somefile.jpg

Image captured by another software

As the result, image captured by opencv is not good as the remaining. The size of image captured by opencv is just 50kB and the remaining size is 110kb. Why are they different?
How can I set the setting of VideoCapture to get the good image? Please help me, thanks.

edit retag flag offensive close merge delete

Comments

I think that size (in byte) are different because Jpeg compression quality is not the same

LBerger gravatar imageLBerger ( 2015-06-27 16:41:20 -0500 )edit

But the quality image captured by VideoCapture before using imwrite, it is also like that. It is not good at the one captured by v4l2-ctl.

nicknguyen071093 gravatar imagenicknguyen071093 ( 2015-06-27 22:30:55 -0500 )edit
2

May be an answer is ithis post

LBerger gravatar imageLBerger ( 2015-06-28 02:09:13 -0500 )edit

I will try. Thank you so much.

nicknguyen071093 gravatar imagenicknguyen071093 ( 2015-06-28 02:31:40 -0500 )edit