How to enlarge binary image background in output screen?

조회 수: 2 (최근 30일)
Zara Khan
Zara Khan 2018년 12월 4일
답변: Image Analyst 2018년 12월 4일
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일
편집: 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일
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일
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일
Assuming you have the circles and just need to visualize them, use viscircles().

Image Analyst
Image Analyst 2018년 12월 4일
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().

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by