縦横比1:1の画像の作り方

4 vues (au cours des 30 derniers jours)
akasa
akasa le 10 Août 2021
Commenté : akasa le 10 Août 2021
Imgfilename=imcrop(Imgdata,[215 1 983 768]);
このような構文で縦横比1:1の画像を作ろうとしたところ、765×984の画像になってしましました。
解決策を教えていただきたいです。

Réponse acceptée

Hernia Baby
Hernia Baby le 10 Août 2021
Modifié(e) : Hernia Baby le 10 Août 2021

単に形を変えるだけでしたら imresize はいかがでしょうか?

  3 commentaires
Hernia Baby
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]);

akasa
akasa le 10 Août 2021
ご回答ありがとうございます。
確認不足でした。

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur スクリプト dans Help Center et File Exchange

Tags

Produits


Version

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!