Issue with getframe and getimage commands while saving the image (image size mismatch).
Mostra commenti meno recenti
Hello:
I have an issue while using getimage() command. I am trying to use a figure, first with imshow to initialize a color image (rgb from code) of size 1944x2592x3 pixels. After this, I want to overlay the bounding-boxes on the color image. I tried using getimage() to obtain the full-size image (1944x2592x3 pixels). It worked, but I am not getting the bounding-boxes overlaid image of full-size. Instead, I am getting a color image (rgb) of full-size.
If I use getframe(), I am getting the overlaid image but of smaller size. Anybody, please help me. I need the image(s) of the original size.
%% Matlab code used % Image overlay rgb = imoverlay(Igray, BW, [1 0 0]);
% Get bounding boxes coords st = regionprops(BW, 'BoundingBox' );
f = figure('Visible', 'off');
a = axes('Visible','off');
imshow(rgb);
hold on
for k = 1 : length(st)
thisBB = st(k).BoundingBox;
rectangle('Position', [thisBB(1),thisBB(2),thisBB(3),thisBB(4)], EdgeColor','G','LineWidth',2 );
end
hold off
frame = getimage(f);
saving frame.cdata into a variable.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Image Arithmetic in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!