How to enlarge binary image background in output screen?

2 Ansichten (letzte 30 Tage)
Zara Khan
Zara Khan am 4 Dez. 2018
Beantwortet: Image Analyst am 4 Dez. 2018
I am drawing 16 different radii circles over a binary image. I want visualize all circles that has been drawn over the image.
  4 Kommentare
Kevin Chng
Kevin Chng am 4 Dez. 2018
Bearbeitet: Kevin Chng am 4 Dez. 2018
imshow('pic.png')
is this what you want?
Zara Khan
Zara Khan am 4 Dez. 2018
no that I have already but not able to visualize all circles See pic.png. larger circles are not visible

Melden Sie sich an, um zu kommentieren.

Antworten (3)

KSSV
KSSV am 4 Dez. 2018
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 Kommentare
Zara Khan
Zara Khan am 4 Dez. 2018
Padding with back ground pixels possible so that can visualize all diameter circles ??????
KSSV
KSSV am 4 Dez. 2018
use imresize and increase the dimensions of your image.

Melden Sie sich an, um zu kommentieren.


Image Analyst
Image Analyst am 4 Dez. 2018
Assuming you have the circles and just need to visualize them, use viscircles().

Image Analyst
Image Analyst am 4 Dez. 2018
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().

Kategorien

Mehr zu Convert Image Type finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by