Crop and save multiple images
이전 댓글 표시
Hi, there i want to crop and save images 7x7 from a folder the fullname of the folder is c:\users\michaela\Desktop\homework\2 can anyone help me with the code in matlab .I want to take a different picture it's time and crop it and this i want it for 10.000 times .How can i achive that?
댓글 수: 5
Walter Roberson
2021년 5월 16일
You want to save as 7 pixels by 7 pixels ??
Which portion of the image do you want to extract out?
Is it possible that you want to resize to 7 x 7 instead of cropping to 7 x 7 ?
mixaela pozoukidou
2021년 5월 16일
mixaela pozoukidou
2021년 5월 16일
Image Analyst
2021년 8월 7일
편집: Image Analyst
2021년 8월 7일
So, just to be clear, let's say you have a folder with 500 images, and each image is 1920x1080 pixels. So you are "not interested at portion of the image" which I take to mean that you want to extract out a 7x7 patch from somewhere, but don't care where. From some random location, I guess. So you want to extract a 7x7 chunk of the image from a random location in the 1920x1080 image. In the end you will have 500 7x7 "images" -- is that correct?
By the way, what good are 7x7 images? Nothing in them will be recognizable.
Walter Roberson
2021년 8월 8일
One of the reasons people take random small samples from an array is if they are doing Compressive Sensing -- though for that particular application you would usually want to know where you extracted the patch from.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Image Arithmetic에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!