dpilger26 / NumCpp

C++ implementation of the Python Numpy library

Home Page:https://dpilger26.github.io/NumCpp

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NumCpp cannot show gray value over 128 when convert to Opencv Mat

JimXu1989 opened this issue · comments

Describe the bug
Hi, thanks for the great sharing!!
While I find when I use NumCpp with opencv, the image I convert from NumCpp array,
All the pixel gray value over 128 are set to 0. so as the example provided offically:
https://dpilger26.github.io/NumCpp/doxygen/html/_interface_with_open_c_v_8cpp-example.html

when I use
cv::imwrite("test.bmp", transposedCvArray);
to save the Image to disk, I got this:

test

Could you help me solve this?
Thanks a lot!

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

problem solved , use CV_8UC1 instead is fine