How to process the image in parts
古いコメントを表示
I'm working with object detection, but my object of interest is too small. I would like to split my image into parts and process each part of the image automatically.
Here's an example:

My code below:
clear, clc, close all;
load('Detector.mat');
I = imread('fotos/foto (15).jpg');
[bboxes, scores] = detect(detector,I);
for i = 1:length(scores)
annotation = sprintf('Soja = %.1f',scores(i));
I = insertObjectAnnotation(I,'rectangle',bboxes(i,:),annotation);
end
figure
imshow(I)
title(size(bboxes,1))
'Detector.mat' is also archived.
I would like you to help me.
3 件のコメント
Benjamin Thompson
2022 年 2 月 2 日
Images are just matrices, so you can use colon notation to copy a part of the matrix:
>> A = imread('image.bmp');
>> size(A)
ans =
3067 1540 3
>> A1 = A(1:500,1:500,:);
>> figure, imshow(A1)
Guilherme Franklin
2022 年 2 月 2 日
Guilherme Franklin
2022 年 2 月 2 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Deep Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
