I have a idea to solve but I couldn't implement it. The idea is if we can set a particular threshold and only for those threshold only 2 images will be selected using if/else loop. So how to implement it? Please anyone help
Selecting 2 selected images from dataset for further work ?
1 view (last 30 days)
Show older comments
Here are 10 images of plant leaf . I want to select or take "6.jpg" & "8.jpg" from these 10 image dataset for my further process . So How to Design a system that automatically takes only 2 images and store it .
I want this knowledge How to do such problems as I want to use in My big dataset.
So, Anyone please help me to solve this problem .
%%"Here, are the all 10 images & from here I want to select or take "6.jpg" & "8.jpg" only ".
2 Comments
Marcus Glover
on 1 Jun 2022
What criteria are you selecting these images? Based on name? Or some property of the image?
Answers (1)
KSSV
on 1 Jun 2022
Where you have the images? In a single folder? If so:
Imgs = dir('*.JPG') ; % you are in the folder of images
N = length(Imgs) ; % Total number of images
idx = [];
for i = 1:N
Img = Imgs(i).name ;
I = imread(Img) ;
% do what you want. May be get threshold value
% use if condition for the threshold to save the indices which
% obey your criteria
if threshold_value <= value
idx = [idx ; i]
end
end
With the indices idx, pick the images you want.
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!