Position Of pixel
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
heyy.. can anyone help me out in finding out the position of pixel of an binaryimage and the grayscale value of pixel
채택된 답변
Sean de Wolski
2011년 5월 19일
0 개 추천
Igray(Ibinary); %extract gray values of true binary values
true_locations = find(Ibinary); %indices of binary values
You'll have to be more specific if you want more information.
EDIT per comment/clarification:
%Ibinary is your logical map
%Igray is your grayscale image
%Conversions as necessary
if ~isa(Igray,'double');Igray = double(Igray);end
if ~islogical(Ibinary);Ibinary = logical(Ibinary);end
wtrr = bsxfun(@times,(1:size(Igray,1)).',Igray); %weighted Igray by rows
wtrr = sum(wtrr(Ibinary)); %Sum the ones that matter
wtcc = bsxfun(@times,1:size(Igray,2),Igray); %weighted Igray by columns
wtcc = sum(wtcc(Ibinary)); %sum the ones that matter
Gtot = sum(Igray(:));
CGr = sum(wtrr(:))/Gtot;
CGc = sum(wtcc(:))/Gtot;
%CGr is the CG amongst rows (y) and CGc is the CG amongst columns (x)
댓글 수: 7
Gova ReDDy
2011년 5월 19일
danx for ur reply....ill give a detail information abt dis...
I want to find the position of centre of gravity of binary image using the formual:
COG=(summation(position of pixel * grayscale value of pixel) ) %(summation (grayscale value of pixel))...is der anyother way to find out COG
Gova ReDDy
2011년 5월 20일
In this line % wtrr = bsxfun(@times,(1:size(Igray,1)).',Igray) %
what does % (1:size(Igray,1)).',Igray) % means
Gova ReDDy
2011년 5월 20일
what dis %logical % does
Sean de Wolski
2011년 5월 20일
It multiplies element-wise the column vector (1:size(Igray,1)).' by every column of Igray. logical converts an image to binary.
doc logical
doc bsxfun
Gova ReDDy
2011년 5월 20일
Danxxxxxxx...can u please figure out this one
How to prepare images of the Gaussian shaped illumination intensity line with --half width:20 lenght:1200 tilt:0.001
Sean de Wolski
2011년 5월 20일
Nope.
Gova ReDDy
2011년 5월 20일
thanks in advance....can u xplain me what %gauss2mf% function does in detail
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기
제품
참고 항목
2011년 5월 19일
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
