Camview widget

More
25 Jul 2020 16:59 - 25 Jul 2020 17:05 #175750 by persei8
Camview widget was created by persei8
Not sure this is actually related to qtvcp, but there is a small issue with camview. I added a camview widget to qtdragon and it seems to work OK in that there is an image with a circle and a crosshair. However, in the terminal window, there is a steady stream of:

Corrupt JPEG data: n extraneous bytes before marker 0xnn

The camera is a Logitech C270 which is an opencv camera but does not have driver support for linux (not sure that matters)
The behavior is the same when running directly, without the GUI, ie.

$ python camview_widget.py

If someone has any insights, I'd appreciate hearing your thoughts. Thank you.
PS - the camera works fine with Cheese
Last edit: 25 Jul 2020 17:05 by persei8. Reason: added PS

Please Log in or Create an account to join the conversation.

More
25 Jul 2020 17:26 #175762 by tommylight
Replied by tommylight on topic Camview widget
Never used that, but i did notice on two of my laptops with 4K cameras i can not get any resolution over 1280X720 in Linux.
Something to do with the proprietary drivers and stuff, so open source got the boot, as usual.

Please Log in or Create an account to join the conversation.

More
26 Jul 2020 02:28 #175841 by cmorley
Replied by cmorley on topic Camview widget
I see discussions on this problem (googled the error message with opencv added):
github.com/opencv/opencv/issues/9477

Please Log in or Create an account to join the conversation.

More
26 Jul 2020 02:29 #175842 by cmorley
Replied by cmorley on topic Camview widget
By the way would it be useful to display the angle of the cross hairs when rotated?

Please Log in or Create an account to join the conversation.

More
26 Jul 2020 16:21 #175923 by persei8
Replied by persei8 on topic Camview widget
I did see that. It appears that the problem originates with libjpeg which was last updated in 2008 and the solution is to modify a compile flag and recompile opencv. This is beyond my pay grade, so ... dead end.
The following user(s) said Thank You: NTULINUX

Please Log in or Create an account to join the conversation.

More
26 Jul 2020 16:34 #175925 by cmorley
Replied by cmorley on topic Camview widget
us it just the annoying error messages or is there a display problem too?

Please Log in or Create an account to join the conversation.

More
26 Jul 2020 18:57 #175951 by persei8
Replied by persei8 on topic Camview widget
Basically, it's the constant stream of error messages. There may or may not be a message for every frame but it's close. It appears to work otherwise.

Please Log in or Create an account to join the conversation.

More
27 Jul 2020 11:10 #176062 by rodw
Replied by rodw on topic Camview widget
From my work a few years ago, Camview was pretty old and unsupported. Now this is where I have no memory of the specifics but one of the standard Linux USB cam viewers had command line settings that allow you to draw rectangles. You can (and I did) set it up so a rectangle at upper left and one at lower right so the corners intersect to form crosshairs. Then you can embed the application direct into a new tab. In the end I did not go this way becasue the length of the USB cable required was longer than the USB spec supported (and I had been caught before). Yeh, camview supports some fancy buttons, but with my crosshair laser, I just programmed a macro button to move to and touch off X & Y on the crosshair position.

Please Log in or Create an account to join the conversation.

More
27 Jul 2020 15:47 #176091 by cmorley
Replied by cmorley on topic Camview widget
Jim is using camview from qtvcp - it uses opencv.
It has digital zoom and rotatable cross hair/circle for alignment.

The alternative you are speaking about is mplayer.
forum.linuxcnc.org/10-advanced-configura...cam-axis-cross-hairs

But if the underlying camera library is broken then it won't matter.

Chris
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
01 Aug 2020 00:06 #176712 by persei8
Replied by persei8 on topic Camview widget
I guess I better ask for a raise, because I did manage to recompile opencv-4.0.0 and the warning messages are gone. So, another feature for qtdragon.
Description of the problem is at github.com/opencv/opencv/issues/9477
How to recompile is at docs.opencv.org/master/d7/d9/tutorial_linux_install.html
Jim
The following user(s) said Thank You: phillc54, tommylight, rodw

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.192 seconds
Powered by Kunena Forum