HOW CAN I CREATE ROI IN IMAGE WITHOUT CROPPED IT FOR FEATURES DETECTION
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
messaoudi nada
el 26 de Oct. de 2021
Comentada: yanqi liu
el 28 de Oct. de 2021
hellow everyone , i need help please! i want to extract SIFT features in region of intrerest for face so the first step is to create ROI in image and when i tried this code i got the binary image and the binarymask but i don't know how can i find the masked roi ! for features detection , i called regionprops but i don't know how i use it to get roi in my images without cropped it
THANKS IN ADVANCE !
ch=strcat('C:\Users\nada\Desktop\nadamastere\bd\fatigue\p1\image_',num2str(v,'%d'),'.png');
I1=imread(ch);
I1=imresize(I1,[row,colum]);
I1=rgb2gray(I1);
I1=im2double(I1);
I1=im2bw(I1);
figure(2);imshow(I1);
roI=imrect(gca,[20 20 110 120]);
bw=createMask(roI);
figure(3);imshow(bw);
props = regionprops(bw,'BoundingBox');
b =props(1).BoundingBox;
0 comentarios
Respuesta aceptada
yanqi liu
el 27 de Oct. de 2021
ch=strcat('C:\Users\nada\Desktop\nadamastere\bd\fatigue\p1\image_',num2str(v,'%d'),'.png');
I1=imread(ch);
I1=imresize(I1,[row,colum]);
I1=rgb2gray(I1);
im = I1;
I1=im2double(I1);
I1=im2bw(I1);
figure(2);imshow(I1);
roI=imrect(gca,[20 20 110 120]);
bw=createMask(roI);
figure(3);imshow(bw);
props = regionprops(bw,'BoundingBox');
b =props(1).BoundingBox;
% use it to get roi in my images without cropped it
im2 = im .* uint8(bw);
figure; imshow(im2, []);
2 comentarios
yanqi liu
el 28 de Oct. de 2021
clc; clear all; close all
ch = 'cameraman.tif';
row = 256;
colum = 256;
% ch=strcat('C:\Users\nada\Desktop\nadamastere\bd\fatigue\p1\image_',num2str(v,'%d'),'.png');
I1=imread(ch);
I1=imresize(I1,[row,colum],'bilinear');
% I1=rgb2gray(I1);
im = I1;
I1=im2double(I1);
I1=im2bw(I1);
figure(2);imshow(I1);
roI=imrect(gca,[20 20 110 120]);
bw=createMask(roI);
figure(3);imshow(bw);
props = regionprops(bw,'BoundingBox');
b =props(1).BoundingBox;
% use it to get roi in my images without cropped it
im2 = im .* uint8(bw);
% extract features
corners = detectFASTFeatures(im2,'ROI',[20 20 110 120]);
figure; imshow(im2, []);hold on;plot(corners.selectStrongest(50));
Más respuestas (1)
Image Analyst
el 26 de Oct. de 2021
bw=createMask(roI);
bw = bw & I1; % Combine it with the binary blobs from the thresholded face.
props = regionprops(bw,'BoundingBox');
Ver también
Categorías
Más información sobre SIFT - Scale Invariant Feature Transform en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!