Extract 80 by 80 patch from image by taking center point of each object in image.
10 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Tahir
el 5 de Mayo de 2014
Comentada: Tahir
el 8 de Mayo de 2014
Hello,i want to Extract 80 by 80 patch from image by taking center point of each object in image. This is gray level image.
0 comentarios
Respuesta aceptada
Image Analyst
el 6 de Mayo de 2014
% Get the size of the image
[rows, columns, numberOfColorChannels] = size(yourImage);
% Determine starting and ending rows and columns.
row1 = floor(rows/2 - 40);
col1 = floor(columns/2-40);
% Extract sub-image using imcrop():
subImage = imcrop(yourImage, [col1, row1, 80, 80]);
3 comentarios
Image Analyst
el 8 de Mayo de 2014
Nearly the same as what I already showed you:
% Determine starting and ending rows and columns.
row1 = floor(c(2) - 40);
col1 = floor(c(1) - 40);
% Extract sub-image using imcrop():
subImage = imcrop(yourImage, [col1, row1, 80, 80]);
Más respuestas (0)
Ver también
Categorías
Más información sobre Explore and Edit Images with Image Viewer App 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!