shifting a part of image (not rectangular shape)
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have an rectangular shape image. In which there is an inclined line (not vertical or horizontal) separating that image into 2 parts. I want to shift one part of the image down by a fixed amount of pixels. how can do that
0 commentaires
Réponse acceptée
Walter Roberson
le 10 Oct 2011
The question is not clear. Are you pulling one part of the image "away" from the dividing line, or are you pushing it "into" the dividing line?
If you are pulling it "away" from the dividing line, then what should go in to the new space between the dividing line and the new location, and what should happen with the part of the image that would protrude beneath the old bottom of the image?
If you are pushing it "into" the dividing line, should the pixels that would go above the line just be discarded? And what should go in to the empty space left by moving the image?
Is the inclined line a straight line defined by a start and end point, or do its boundaries need to be found by examining the image to detect some distinctive property of the boundary?
3 commentaires
Walter Roberson
le 10 Oct 2011
So the original pixels 495-500 can be thrown away if they would go beyond the edge?
Based upon your original description, I thought perhaps you wanted to shift a cut rectangular block -- rectangular until it hit the dividing line. But your answer has left me thinking that perhaps you meant something else?
Does the straight line only go through part of the overall image? When the rows are shifted, should the portion of the image between the left or right edge of the line and the edge of the image be left as-is?
An example might help.
http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers
Walter Roberson
le 10 Oct 2011
That last should have been written in terms of the upper and lower part of the line edge, not the left and right part.
Plus de réponses (3)
Voir également
Catégories
En savoir plus sur 3-D Volumetric Image Processing dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!