単に形を変えるだけでしたら imresize はいかがでしょうか?
縦横比1:1の画像の作り方
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Imgfilename=imcrop(Imgdata,[215 1 983 768]);
このような構文で縦横比1:1の画像を作ろうとしたところ、765×984の画像になってしましました。
解決策を教えていただきたいです。
0 commentaires
Réponse acceptée
Hernia Baby
le 10 Août 2021
Modifié(e) : Hernia Baby
le 10 Août 2021
3 commentaires
Hernia Baby
le 10 Août 2021
Modifié(e) : Hernia Baby
le 10 Août 2021
出払ってて検証できてないのですが [xmin ymin xmax ymax]での指定が原因かと思われます。 imcropの指定値を見るに以下のようにすればいけるのではないかと推測します。
Imgfilename=imcrop(Imgdata,[215 1 768 768]);
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!