-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Support for higher resolution cameras in LitePlacer software #11
Comments
I have to get and play with better cameras. In the meanwhile, if you want to play with this yourself, it would be the SizeMode property of the various picture boxes in the MainForm.cs design view. But yes, supporting better cameras would be good. |
I have played with different Behavior.SizeMode parameters for the various PictureBox objects. I noticed that in the main version of LitePlacer this setting is not consistent. It is "CenterImage" on some screens and "Normal" on others - which explains the observed behavior. In my own local fork of LitePlacer software I tried the following settings:
Conclusion: I think that the optimal approach will be something similar to what I described in my initial issue record, a two step approach: a) We need to first configure the parameters of the hardware driver to tell the camera which resolution we want. No point in using FullHD, I would rather run the same chip with 720p only but higher framerate and less noise. b) We need to configure a virtual viewport - the area of the picutre to be used - parts outside this area will be cropped and discarded. I have not gotten to the details of camera hardware handling yet but I will continue to look into this once I get my head around VisualStudio and MS C# language... ;-) |
It uses CenterImage now on all views, and this is as far as I want to go in ver1. |
I am experimenting with a custom 720p cam for uplooking vision and 1080p for downlooking vision (both modified computer webcams).
Resolution (pixel per mm) is obviously higher than with the pen cams from Juha's kit and also the noise is significantly lower with the CMOS chips I am using - which will hopefully allow higher accuracy for component orientation / detection and positioning.
However, software support is not 100% working yet. The camera image is scaled correctly on the tabs "Camera Setup" and "Run Job", I only see a smaller viewport (basically top-left corner of the full size) on the "Basic Setup" screen - which makes needle position calibration impossible.
My idea to extend LitePlacer for supporting higher resolution cams is the following:
a) Set the desired hardware resolution which the chip should send to computer (e.g. 640x480, 1024x768, 1280×720, 1920×1080 pixels). I can specifiy the "size" parameter in VLC for example, so it should be possible. Using a lower resolution often results in less noise and also higher frame rate. Also, this setting would allow to adjust for aspect ratio (4:3 vs. widescreen picture).
b) Define a "viewport" to be used in program. This would basically mean "cropping" the image to a suitable size and aspect ratio. That way, we could use a smaller portion of the total image. This would be beneficial e.g. with lenses that distort the images at the borders and again to use cameras with an aspect ratio different than 4:3.
c) As a bonus, some basic corrections such as mirroring the image or turning it by 180° could be applied here. Could come in handy if the camera can only be mounted in one direction - but this is less critical.
Does this make sense?
The text was updated successfully, but these errors were encountered: