Info

此问题已关闭。 请重新打开它进行编辑或回答。

can any one tell me what does the floating point values mean in the following code

1 次查看(过去 30 天)
darks = find(v <.2)'; lights = find(s < .05 & v > .85)'; h([darks lights])= -1; disp(length(darks)) black = length(darks)/pixels;[x,y, z]=size(I); white = length(lights)/pixels; red = length(find((h >.9167 | h <=.083) & h~=-1))/pixels; yellow=length(find(h >.083 & h<=.25))/pixels; green=length(find(h > .25 & h<= .4167))/pixels; cyan= length(find(h > .4167 & h<= .5833))/pixels; blue=length(find(h > .5833 & h <= .75))/pixels; magenta=length(find(h > .75 & h <= .9167))/pixels;
  1 个评论
Petr Dvorak
Petr Dvorak 2014-6-23
Hi, I guess, the floating-point numbers are the treshold numbers which decide whether the point has particular properties. The first (0.05 and 0.85) decides whether the pixel is too light or dark. The other decides whether the color of selected pixels is red, yellow or so... Try to change the numbers and you will probably see color-distortion.

回答(0 个)

标签

Community Treasure Hunt

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

Start Hunting!

Translated by