Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yarp::sig::file::write() doesn't handle properly images retrieved with yarp::cv::fromCvMat() #1939

Closed
pattacini opened this issue Jan 2, 2019 · 1 comment

Comments

@pattacini
Copy link
Member

pattacini commented Jan 2, 2019

Describe the bug
Following up #1932, I've updated the test yarp/example/opencv that now uses the latest yarp::cv::[toCvMat|fromCvMat<>] routines handling the conversion [to|from] OpenCV.

Two test images are saved by means of yarp::sig::file::write() function, which should be the same but they're not.

To Reproduce

  • cmake
  • make
  • launch the binary
  • compare test-1.ppm vs. test-2.ppm

Expected behavior
The two images should look the same.

Screenshots

test-1 test-2
test-1.ppm test-2.ppm

Note that the two images have been converted into png to be dropped herein.

Configuration:

  • OS: Windows
  • yarp version: current devel
  • compiler: MSVC 2017

cc @Nicogene @drdanz

@pattacini pattacini changed the title yarp::sig::file::write() doesn't handle properly images retrieved with fromCvMat() yarp::sig::file::write() doesn't handle properly images retrieved with yarp::cv::fromCvMat() Jan 2, 2019
@pattacini
Copy link
Member Author

Actually, df586cc solves the problem.

There was only one memory area (allocated by yarpImage) that was wrapped twice causing the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants