how can i remove white spaces around this image ?
Afficher commentaires plus anciens
Réponse acceptée
Plus de réponses (1)
Image Analyst
le 27 Juin 2017
0 votes
It looks reasonably well cropped right now. Why do you need to chop off a few pixels more? What's the need? I think you can do what you need to do without cropping to the bounding box, so why bother?
5 commentaires
Israa Alqaraleh
le 27 Juin 2017
Israa Alqaraleh
le 27 Juin 2017
Image Analyst
le 27 Juin 2017
You might be able to use a radon transform, like in the attached demo, but you'd have to adapt it to find the profile with the greatest contrast.
But I think maybe I'd try to use hough to detect lines. Then find the average angle of all the lines it finds. If that doesn't work you can find the bounding box of the dots with bwconvhull() and then try to identify the 4 sides and determine which are parallel or 90 degrees to each other. The minimum perimeter polygon algorithm may be useful here. On your bottom, because the line doesn't go all the way over, the top line will not be parallel to the bottom line of the convex hull.
Israa Alqaraleh
le 27 Juin 2017
Image Analyst
le 27 Juin 2017
I already told you what to do next if that didn't work: "If that doesn't work you can......". See my above comment.
Catégories
En savoir plus sur Display 2-D Images dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
