Ask Your Question

C++<uchar> to Java

asked 2017-06-27 14:34:59 -0600

Mark1 gravatar image

Hi I am trying to convert some C++ OpenCV code to Java OpenCV code. I am trying to convert the following lines to Java:

for(int i = 0; i < image.rows; i++){
  for(int j = 0; j < image.cols; j++){         
    uchar p =<uchar>(i, j);

Can anyone help me out in explaining what the C++ code is doing and how to convert it? Thanks in advance

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2017-06-27 14:53:30 -0600

LBerger gravatar image

In C++ at method is used for pixel access.<uchar>(i,j) gives pixel value at row i and column j. Pixel type is unsigned char.

I don't know java but i think you can find an answer in this sample : you can use get method


edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2017-06-27 14:34:59 -0600

Seen: 216 times

Last updated: Jun 27 '17