![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1170843/image.png)
Crop frames in video and apply it on other frames.
20 ビュー (過去 30 日間)
古いコメントを表示
Eliska Paulikova
2022 年 10 月 27 日
編集済み: KALYAN ACHARJYA
2022 年 10 月 27 日
Hello,
I have a video, which I split in frames. Now, I would like to take the first frame, crop it, and this crop apply on other frames. How I can do it?
Or is there any way to crop whole video?
0 件のコメント
採用された回答
KALYAN ACHARJYA
2022 年 10 月 27 日
編集済み: KALYAN ACHARJYA
2022 年 10 月 27 日
As per question you have already done video to frame splits let's consider im1 and im2 have same size images, rxcx3 unit 8 type.
You can place any part of the image to another image of the same type. Let's say you want to crop the first images from the index 20 to 300 rows and 20 to 300 columns in all channels and put it the same as the second image.
im2(20:300,20:300,:)=im1(20:300,20:300,:);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1170843/image.png)
#It's all about replace the data elements (applicable in all arrays), ensure that data type must be same.
Hope it helps!
3 件のコメント
KALYAN ACHARJYA
2022 年 10 月 27 日
Yes, use imtool funtion to open the image and crop it as per the requirements and save the modified in current workspace
imtool(im1);
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1170878/image.png)
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!