Camera configuration

More
2 years 10 months ago #289260 by wusel0464
Hello,

Is there a way in QtDragon HD to adjust the resolution and aspect ratio of the camera. At the moment the display is distorted, the camera I use is an Andonstar 3MP.

Thank you in advance and a happy new year.
Greetings Frank

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

More
2 years 10 months ago #289300 by cmorley
Replied by cmorley on topic Camera configuration
It's possible, but currently not easy.
What version or linuxcnc do you use? Did you compile it or download it?
it would require changing a file on your system. In the future I cam make it a configurable setting.

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

More
2 years 10 months ago #289304 by wusel0464
Replied by wusel0464 on topic Camera configuration
Hello,

Downloaded, Linux is Bookworm, QtDragon HD.
It's not that you can't use it, it's just that it's a little harder to center the wide holes.
The camera is a good solution for my purposes; I would need something like an edge finder once a year, if at all.
Years ago, someone from the plasma sector developed a camera solution with which you could immediately determine the tilt and then rotate the coordinate system accordingly.

forum.linuxcnc.org/plasmac/40057-camera-for-touchoff

I still miss something so simple.

If you install something like that, I would be very grateful and I can wait that long, it's not like you can't work.

Thank you in advance and happy new year.
Greetings Frank

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

More
2 years 10 months ago #289342 by cmorley
Replied by cmorley on topic Camera configuration
We will start with fixing the image.

You need to change a file on your system with the one I supply here.
The file should be in:
/usr/lib/python3/dist-packages/qtvcp/widgets/
You will need sudo privileges to replace it.
If you update it will get replaced and you will have to add it again.

in that file is a couple variables:
        self.scaleX = 1.0
        self.scaleY = 1.0

changing one of these number will alter the aspect ratio.

Let me know if you were successful and then I can add it to a future release.

The other request is a much bigger change so I'll look into it a bit later.

Chris

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

More
2 years 10 months ago #289344 by cmorley
Replied by cmorley on topic Camera configuration
The filename is camview_widget.py - please rename the supplied file to that.

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

More
2 years 10 months ago #289368 by wusel0464
Replied by wusel0464 on topic Camera configuration
Hello,

works, thank you very much.
The only thing that might be important for general use is that if the camera resolution is poor, the upscaled axis will negatively affect the display.
Since in QtDragon HD the window in X is the longest, you have to enlarge Y to get to the goal. This could probably be done by limiting the actual image output area.
My values for X=1.0 and Y=1.5 are attached two more pictures.

Thank you in advance and happy new year.
Greetings Frank

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

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