Camera configuration
28 Dec 2023 16:15 #289260
by wusel0464
Camera configuration was created 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
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.
29 Dec 2023 07:39 #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.
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.
29 Dec 2023 09:09 #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
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.
29 Dec 2023 22:51 #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
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.
29 Dec 2023 22:52 #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.
30 Dec 2023 10:10 #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
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.
30 Dec 2023 10:48 #289370
by wusel0464
Replied by wusel0464 on topic Camera configuration
Hello,
Since we are currently tinkering with the camview_widget, two things come to mind.
Would it be possible to add a button for rotating the display, which, so to speak, simulates pressing the right mouse button when activated on a touchscreen? The onboard screen keyboard has such a function and if I activate it, then I can also rotate the display accordingly in QtDragon.
I can't handle gesture control and I don't want to clog up the system too much.
Secondly, the MDI buttons could also be used in the camera window.
Basically, I'm chasing the desire to be able to do some functions from the probe screen with the camera.
Thank you in advance and happy new year.
Greetings Frank
PS I changed the Y scaling to 1.6, it's a little rounder.
Since we are currently tinkering with the camview_widget, two things come to mind.
Would it be possible to add a button for rotating the display, which, so to speak, simulates pressing the right mouse button when activated on a touchscreen? The onboard screen keyboard has such a function and if I activate it, then I can also rotate the display accordingly in QtDragon.
I can't handle gesture control and I don't want to clog up the system too much.
Secondly, the MDI buttons could also be used in the camera window.
Basically, I'm chasing the desire to be able to do some functions from the probe screen with the camera.
Thank you in advance and happy new year.
Greetings Frank
PS I changed the Y scaling to 1.6, it's a little rounder.
Please Log in or Create an account to join the conversation.
30 Dec 2023 22:33 - 30 Dec 2023 22:33 #289392
by cmorley
Replied by cmorley on topic Camera configuration
Did you try setting X < 1 rather then Y >1 - it might help the poor picture.
Last edit: 30 Dec 2023 22:33 by cmorley.
Please Log in or Create an account to join the conversation.
31 Dec 2023 00:22 - 31 Dec 2023 00:24 #289401
by cmorley
Replied by cmorley on topic Camera configuration
The macro buttons not showing is actually a layout problem - they should be available in other modes.
Since you asked, I fixed it and maybe you can test for me:
if you decompress the file you will find a folder: qtdragon_hd
inside that folder is two files that you need to add to your config.
Inside your config folder is a folder of folders: qtvcp/screens/qtdragon_hd/
Those twp files need to go in the there. If there is a problem you can remove the files and qtvcp will use the normal ones again.
You should then see the macro buttons in main, cam and user in non auto mode.
Since you asked, I fixed it and maybe you can test for me:
if you decompress the file you will find a folder: qtdragon_hd
inside that folder is two files that you need to add to your config.
Inside your config folder is a folder of folders: qtvcp/screens/qtdragon_hd/
Those twp files need to go in the there. If there is a problem you can remove the files and qtvcp will use the normal ones again.
You should then see the macro buttons in main, cam and user in non auto mode.
Last edit: 31 Dec 2023 00:24 by cmorley.
Please Log in or Create an account to join the conversation.
31 Dec 2023 12:53 #289429
by wusel0464
Replied by wusel0464 on topic Camera configuration
Hello,
Works perfectly, makes it a little more convenient to use in my opinion. A few buttons will be assigned other functions when I get the baked goods. Theoretically, you could also adopt the camera offset button into the camera window, but that's a matter of personal preference and thought processes; for other users it may also be in the right place where it is now.
It's a shame that I'm at odds with foreign and programming languages. I can build a cheese milling machine from my head or, like in my work, disassemble an SMD assembly head and put it back together again without instructions, but unfortunately my simulation capsule is not wired for languages.
Many thanks and best wishes to everyone and a happy new year.
Frank
Works perfectly, makes it a little more convenient to use in my opinion. A few buttons will be assigned other functions when I get the baked goods. Theoretically, you could also adopt the camera offset button into the camera window, but that's a matter of personal preference and thought processes; for other users it may also be in the right place where it is now.
It's a shame that I'm at odds with foreign and programming languages. I can build a cheese milling machine from my head or, like in my work, disassemble an SMD assembly head and put it back together again without instructions, but unfortunately my simulation capsule is not wired for languages.
Many thanks and best wishes to everyone and a happy new year.
Frank
Please Log in or Create an account to join the conversation.
Moderators: cmorley
Time to create page: 0.119 seconds