필터 지우기
필터 지우기

How can I get pixels info like the function "impixel", but for multiple pixel?

조회 수: 2 (최근 30일)
Matanya
Matanya 2013년 6월 3일
I want to get a plot of RGB info as a function of location (x,y), by drawing a line. (In impixel I need to choose one pixel, but I want a line of pixel)
Thank you.

답변 (1개)

Iain
Iain 2013년 6월 3일
plot(squeeze(image(:,column,1)),'r')
hold on
plot(squeeze(image(:,column,2)),'g')
plot(squeeze(image(:,column,3)),'b')
xlabel 'Column nmumber'
figure
plot(squeeze(image(row,:,1)),'r')
hold on
plot(squeeze(image(row,:,2)),'g')
plot(squeeze(image(row,:,,3)),'b')
xlabel 'Row nmumber'
  댓글 수: 1
Matanya
Matanya 2013년 6월 3일
Hi lain, thanks for the answer! Actually I meant to draw a line with the mouse and get the info that in the pixel that are in the line.

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

Community Treasure Hunt

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

Start Hunting!

Translated by