-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
vips_colourspace error upon calling vips_hough_line #3664
Comments
Hi @ewelot, You need to use a format that supports int32 pixels, so perhaps:
nip2 can be handy for exploring the hough transforms: |
Ah, it's some restriction on the output image format! So, maybe you could add a note on that to the documentation ... :) |
I'm having problems to understand the output of vips_hough_line(). While it works fine with my images and produces expected number of peaks clearly in the "votes" image, I am not able to translate the peak coordinates to a function representing the line(s), although the API documentation is quite clear on that matter. Could you please describe an example on how to translate peak coordinates to a linear function equation (or simply r and alpha) taking into account the size of the parameter space and the size of the input image? Another strange observation - at least to my current knowledge - comes from another experiment. Lets have an image A containing a straight line resulting in a single peak in the votes image at Xa,Ya. Then I remove some columns on the right side of A producing an image B which now has a somewhat smaller width. It should still contain the line unmodified, which means both the distance to the origin of the image (upper left corner) and the angle between line and x-axis have not changed. Surprisingly the peak in the votes image of B is off in both coordintes (Xb != Xa, Yb != Ya). What am I missing? |
Here's a workspace that demos http://www.rollthepotato.net/~john/hough.ws It looks like this: So it draws a line, takes the Hough transform, then recovers the line position from the transform. You can adjust the parameters and see all the images change. |
Thank you very much, I'll play with it (good opportunity to learn nip2 ...) and see how I can recover the line parameters. |
Sorry for re-opening this issue ...
Are you sure the workspace is using the correct formulae to recover the line parameters? |
You're right, it seems to work for non-square parameter space, but not for a non-square input image. I'll have a look. |
I'd like to learn about hough transformation and use vips_hough_line() for that. The goal is to use vips functionality to identify (and remove) satellite trails in astrophotography images which gets increasingly annoying due to StarLink and similar missions.
But any call to hough_line() on a grayscale image fails, e.g.:
vips hough_line satellites.pgm hough_votes.pgm
throws an error message
vips_colourspace: no known route from 'matrix' to 'b-w'
Do I need to prepare the input image in a specific way?
Thanks for help,
Thomas
The text was updated successfully, but these errors were encountered: