English 中文(简体)
开放式餐厅
原标题:OpenCv Accessing pixels
  • 时间:2011-10-27 16:44:12
  •  标签:
  • opencv
  • pixel
for (x=0; x<width-1; x++){
    for(y=0; y<height-1; y++){
        s = cvGet2D(binImage, x, y);
        printf("%f
", s.val[(x,y)]);
        //if (s.val[(x,y)] == 0){

        //} 
    }
}

我只想问一下这部法典。 我正在印刷每种迭代的六氯三联苯值,但是,它完全没有印刷,我在方案结束时有分化错误。 原因何在,我如何确定这一法典? 非常感谢。

最佳回答

The line

s = cvGet2D(binImage, x, y);

should be

s = cvGet2D(binImage, y, x);

虽然如此,文件还不清楚......

Also, I think to print out the pixel you just want to do this (assuming a single channel float image):

printf("%f
", s.val[0]);
问题回答

暂无回答




相关问题
Position of Div in relation to the Top of the Viewport

I am wondering how I can get the number of pixels (or measurement in general) from a div to the top of the window in Javascript. I am not looking for an offset y in relation to the document, simply ...

Haskell pixel drawing library linux

I wish to draw individual pixels on a screen in a window or something for real-time display in haskell. I m just getting started with haskell (but not functional programming, and not graphics), so I ...

What type of Pixel Interpolation is used by OpenGL?

I would like to know what type of Pixel Interpolation is used by OpenGL. Does it use one of the Standard Pixel Interpolation techniques like Nearest Neighbor, Bilinear or Bicubic?

css columns shrinking 100% pixel value

I have a page which is divided up into 3 divs, left center and right. I don t want to display anything in the left and right, they just frame the page. #leftDiv { background-color: Gray; ...

热门标签