Skip to content
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

Regarding the camera resolution #10

Closed
guangyuhe opened this issue Jul 19, 2020 · 3 comments
Closed

Regarding the camera resolution #10

guangyuhe opened this issue Jul 19, 2020 · 3 comments

Comments

@guangyuhe
Copy link

Hi,

The code runs very well when the camera's resolution is '640x480'. The success rate is almost 100%. However, when changing to a higher camera's resolution, like '1600x1200', the success rate drops a lot.
I do see your notes that it has a better performance when using a lower resolution. But I still would like to ask if there is anything I can do to improve the behavior when using a higher camera resolution. And what could be the possible bottleneck for this problem?

Would be appreciated for any suggestions!

@BingyaoHuang
Copy link
Owner

@guangyuhe The reason is that the camera-captured color grid line thickness (in pixel) is changed by the camera resolution (1600x1200), thus the default color grid segmentation parameters may not work well.

For other resolutions, e.g., 1600x1200, you can modify the color grid segmentation parameters such as adaptiveThresh sigma, morphological operation's kernel sizes in segColorGrid and bw2skele accordingly. To find the best parameters, you can turn on the verbose flag for more debug info and see if the color grid is correctly segmented.

@guangyuhe
Copy link
Author

Thank you. It is a very good suggestion.

In segColorGridhttps://github.com/BingyaoHuang/single-shot-pro-cam-calib/blob/master/%2BImgProc/segColorGrid.m#L176, I make the following change from line 175:

% close and open
se1 = strel('line',10,0);%parameter for '1600x1200'
se2 = strel('line',10,90);
% se1 = strel('line',2,0);%original
% se2 = strel('line',2,90);%original

Now, the behavior is very good.

@BingyaoHuang
Copy link
Owner

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants