Take pixels from input image
1 次查看(过去 30 天)
显示 更早的评论
How to take pixels from an input image by using Gaussian sampling?
2 个评论
Image Analyst
2016-10-29
What does that mean? What do you want as an output? A 1-D vector of intensity values? What is Gaussian Sampling? Do you mean the locations are to be taken like in a shotgun pattern concentrated in the middle of the image? Please include more info, such as a diagram.
回答(1 个)
Image Analyst
2016-10-30
Try this:
numPoints = 5000;
xCenter = 1000;
yCenter = 1000;
sigmax = 500;
sigmay = 500;
x = xCenter + sigmax * randn(numPoints, 1);
y = yCenter + sigmay * randn(numPoints, 1);
plot(x, y, 'b.', 'MarkerSize', 8);
grid on;
% Set up figure properties:
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
% Get rid of tool bar and pulldown menus that are along top of figure.
set(gcf, 'Toolbar', 'none', 'Menu', 'none');
% Give a name to the title bar.
set(gcf, 'Name', 'Demo by ImageAnalyst', 'NumberTitle', 'Off')
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!