opencv / opencv

Open Source Computer Vision Library
https://opencv.org
Apache License 2.0
75.95k stars 55.62k forks source link

improvements on tests of imagecodecs module #25525

Closed sturkmen72 closed 1 hour ago

sturkmen72 commented 2 weeks ago

[WIP] trivial improvements on tests of imagecodecs module

sturkmen72 commented 1 week ago

i was not intending to prepare a PR to merge. but now i thing the proposed changes will be useful.

please review and consider the file changes baboon.ppm and read.png ( let me create a PR to opencv_extra if this PR acceptable)

asmorkalov commented 1 week ago

@sturkmen72 What is your motivation of png -> ppm replacement?

sturkmen72 commented 1 week ago

@sturkmen72 What is your motivation of png -> ppm replacement?

  1. i replaced baboon.ppm with correct one ( older was an unrelated image and probably not used in tests) using this new image in tests will be meaningful.
  2. "#if defined(HAVE_PNG) || defined(HAVE_SPNG)" alredy exist in code and HAVE_PNG can be OFF in very rare cases.
  3. a bit related "IT’S TIME TO RETIRE LENA FROM COMPUTER SCIENCE"

As a final word, the proposed changes are open to discussion. It may be unimportant. Let me do required changes according devs opinions.

asmorkalov commented 1 week ago

@mshabunin @opencv-alalek what is you opinion?

vpisarev commented 2 days ago

I would choose beautiful Lena over less-than-beautiful baboon. Honestly, I don't see any real justification to make this change.