How to enlarge binary image background in output screen?

I am drawing 16 different radii circles over a binary image. I want visualize all circles that has been drawn over the image.

4 件のコメント

Kevin Chng
Kevin Chng 2018 年 12 月 4 日
What do you mean visualize all circle here?
Zara Khan
Zara Khan 2018 年 12 月 4 日
yes yes
Kevin Chng
Kevin Chng 2018 年 12 月 4 日
編集済み: Kevin Chng 2018 年 12 月 4 日
imshow('pic.png')
is this what you want?
Zara Khan
Zara Khan 2018 年 12 月 4 日
no that I have already but not able to visualize all circles See pic.png. larger circles are not visible

サインインしてコメントする。

回答 (3 件)

KSSV
KSSV 2018 年 12 月 4 日

0 投票

I = imread('P1_G4_9.png') ;
imshow(I)
[nx,ny] = size(I) ;
[X,Y] = meshgrid(1:ny,1:nx) ;
C = [mean(X(:)) mean(Y(:))] ;
R = 1:10:100 ;
th = linspace(0,2*pi) ;
x = cos(th) ; y = sin(th) ;
hold on
for i = 1:length(R)
plot(C(1)+R(i)*x,C(2)+R(i)*sin(th),'r')
end

5 件のコメント

Zara Khan
Zara Khan 2018 年 12 月 4 日
its working nice when have less no of circles. Not fullfilling my requirements. I am getting same ouput like pic.png
Image Analyst
Image Analyst 2018 年 12 月 4 日
Clear as mud. Is it working nicely or not? Are you getting the output picture like you want or not? What are your requirements? As far as we know, you want an output like pic.png, and you're getting that.
Sorry but only Walter has the Mind Reading Toolbox. The rest of us would need you to clearly state what you have and what you want.
Zara Khan
Zara Khan 2018 年 12 月 4 日
Circles with larger diameters are not fitting into the ouput window. I want all the circles to completely visualize. NOT LIKE pic.png. IN pic.png SOME PORTION OF LARGER DIAMETER CIRCLES HAS BEEN CROPPED.
Zara Khan
Zara Khan 2018 年 12 月 4 日
Padding with back ground pixels possible so that can visualize all diameter circles ??????
KSSV
KSSV 2018 年 12 月 4 日
use imresize and increase the dimensions of your image.

サインインしてコメントする。

Image Analyst
Image Analyst 2018 年 12 月 4 日

0 投票

Assuming you have the circles and just need to visualize them, use viscircles().
Image Analyst
Image Analyst 2018 年 12 月 4 日

0 投票

If you want all the circles you have to, for some reason, extend beyond the image, you're going to have to enlarge the image with padarray(), NOT imresize().

質問済み:

2018 年 12 月 4 日

回答済み:

2018 年 12 月 4 日

Community Treasure Hunt

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

Start Hunting!

Translated by