Closed Hexronimo closed 4 years ago
Hello, Olga! I think this is a good idea. I'll do it.
Best regards, Roman.
Hello @romankh3 Do you have any idea how to implement this yet?
hello, @akondas. I haven't thought about it yet. is it important for you?
Possibly, but more out of curiosity. Because I'm wondering how to deal with it technically.
czw., 21 lis 2019, 16:00 użytkownik Roman Beskrovnyi < notifications@github.com> napisał:
hello, @akondas https://github.com/akondas. I haven't thought about it yet. is it important for you?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/romankh3/image-comparison/issues/138?email_source=notifications&email_token=AB63WLMGJHQ2SK22XVJRYPDQU2PCBA5CNFSM4JK7BLL2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE2QMLQ#issuecomment-557123118, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB63WLMDTJIEV7YUI2SJE3DQU2PCBANCNFSM4JK7BLLQ .
I’m sure that based on pictures we can research it. Don’t hesitate to contribute if you want.
In my opinion, pixelToleranceLevel
param can handle this problem pretty good. For example: 0.1
I thinks so, too. Nevertheless it must be double checked
It really depends on the algorithm used to search for difference, it's quite possible that it will handle compression without any additional code. I can't run it (from.sh) to make test because it seems something wrong with my gradle, it says "Could not determine java version from '11.0.2'", I usually use maven and not particularly familiar with using gradlew.
@Hexronimo, @akondas, at the first look I want to say, that pixeltoleranceLevel
helped with it.
next tests
ImageComparisonResult imageComparisonResult = new ImageComparison(
"images_for_test/test1_no_difference/test1_midi-size_0-compression.jpg",
"images_for_test/test1_no_difference/test1_original_midi-size_no-compression.jpg")
.compareImages();
pairs: | pixelOfToleranceLevel | ComparsionState | | 0.1 | MISMATCH | | 0.2 | MISMATCH | | 0.3 | MISMATCH | | 0.32 | MATCH |
test jpeg with compression.pdf Here I tested it for you. Result: for big images 0.3 tolerance + 100-60%quality -> stable result
That's really great research. Thanks, @Hexronimo!
@Hexronimo, thanks for your research. I have added Wiki-page with it. My article(https://habr.com/ru/post/475482/) can be updated! I think, that this a great example of an open-source community and contribution.
Best regards, Roman.
Hello Roman! Can you, please, add tests for images with different jpeg-compression? I believe many people who often work with jpeg will have this question. When someone made changes in the image in programs like Photoshop or Gimp and save image as jpg file, s/he needs to choose the compression level (good quality and large file weight or visa versa, from 0 to 100%). The compression algorithm makes some changes in pixels of the original image. When compression is near 60-70 quality lowering not much visible for human eyes tho, but still can be tangible for your algorithm even with a 10% sensitivity threshold. So the question is will compression be a problem? Will high compression prevent your library work as expected?
I made some images for 4 tests. Every test is in separate dir which contains an original image that needs to be compared with other 3-4 one by one. Each image has a different quality: original - original with some changes - 60 - 20 - 0 (it's written in the filename). Images in the first dir don't have any 'human-made' difference just compression by itself. And the last test is for text-image, I think it's a very interesting case too. images_for_test.zip