필터 지우기
필터 지우기

plot pixel values in circular image

조회 수: 2 (최근 30일)
Alina tom
Alina tom 2018년 5월 14일
댓글: Alina tom 2018년 5월 17일
Hi all
I have multiple lines each size is 512x1. I want to plot them with a degree increment to make a circular shape image. But don't know how to plot them. Can anyone help me?

답변 (1개)

Image Analyst
Image Analyst 2018년 5월 14일
Use sind() and cosd() to create the x and y endpoints of the line, x1,x2,y1,y2. Then call
line([x1,x2], [y1,y2], 'Color', 'k', 'LineWidth', 2)
Sounds like homework, so give it a try yourself. Have a for loop over all angles. Here's a start:
for angle = 1 : 20 : 360
x1 = lineLength * cosd(angle......
line([x1,x2], [y1,y2], 'Color', 'k', 'LineWidth', 2)
hold on;
end
  댓글 수: 10
Image Analyst
Image Analyst 2018년 5월 16일
See if my copy and paste demo works for you. You can cut out a line, rotate it, and paste it onto a canvass image, if that's what you want to do.
Alina tom
Alina tom 2018년 5월 17일
Sir can you guide me how I fuse/ combine two images . one image is 2d having dimensions 512x271 and other image is 3d having dimensions 512x271x512. I want to combine them to make one image

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by