How to extract certain pixels from an image and reshape to plot?
1 回表示 (過去 30 日間)
古いコメントを表示
Dear Matlab friends,
I have an image example:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/228192/image.jpeg)
Does anybody know how to extract the pixels for the right corner with certain shape and replot it in a rotated fashion? Something as follows:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/228193/image.jpeg)
It'll be good to get it done by Matlab in an antomatic way as I have a large batch of images like this to be processed.
Any help will be much appreciated.
Thanks in advance.
Jun
0 件のコメント
回答 (1 件)
Jyotsna Talluri
2019 年 7 月 26 日
Hi,
You can directly crop the required part of the image by using the imcrop() function
Specify the required size and the position of the cropped region in terms of spatial coordinates.
Refer to this link below for imcrop() function
The function in the below link provides the code which rotates the image by the specified angle with automatic cropping of black corners.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!