Image antyaliasing or something else to get best regionprops orientation?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Like in topic. I show you what my problem concerns. I know that regionprops is one of the eaziest way to get orientation. Also We can get image moments methods etc.

Square graphically generated vs square puzzle with real photo from the camera (after sharpening imsharpen). What do you think, would you like to do some anti-aliasing to improve the orientation of this figure? With triangles, I do not have such a big bad offset, and with a square it even reached the value of 15 degrees.
0 Kommentare
Antworten (1)
Image Analyst
am 5 Feb. 2018
I don't understand. Are you saying that square is tilted 5.3558 or 15 degrees and you want to straighten it? Or are you seeking to do something else? Like smooth the sides or something. And what do you want to do after that? Perhaps smoothing or straightening is not even necessary to do what follows - I don't know because you have not told us.
Also, I would expect the orientation from regionprops() to be very unstable when measuring a square, for obvious reasons. Don't you agree? It could be virtually anything between 0 and 360 degrees depending on the noise.
2 Kommentare
Image Analyst
am 6 Feb. 2018
Like I said regionprops will be unstable with orientation. It takes the blob and fits it to an ellipse and finds the angle of the major axis. Since you have roughly a square, the fit ellipse will be very nearly circular. And what is the angle of a circle? Well if the circle/ellipse is just very slightly noisy, the slightly oblong circle could points in a drastically different direction. Drastically. I think a radon transform would be a better method. Luckily for you, I already have a program to rotate a blob using the radon transform. I've attached it.
Even if imopen did flatten out the sides of the square, you still have the problem that the direction of a circle is undefined. Just a slight perturbation will create a direction in some angle, but a different slight perturbation will cause a totally different angle.
Siehe auch
Kategorien
Mehr zu Geometric Transformation and Image Registration finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!