How to overlay randomized point grid on photo?

1 次查看(过去 30 天)
I need to take a randomized point grid with the code:
x=rand(1,50)*5
y=rand(1,50)*5
scatter(x,y)
And overlay it onto a picture. I am not sure if this can be done or how to do it? Any help would be appreciated!

回答(1 个)

Cedric
Cedric 2017-10-18
编辑:Cedric 2017-10-18
I = imread( 'MyImage.png' ) ;
x = rand( 1, 50 ) * size( I, 2 ) ;
y = rand( 1, 50 ) * size( I, 1 ) ;
imshow( I ) ;
hold on ;
scatter( x, y ) ;
  1 个评论
Cedric
Cedric 2017-10-21
Is this answer working for you? If so please [Accept it]. If not, I am happy to provide more information.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Image Processing Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by