I have been fighting with this for a while without any luck. I am converting a pdf using wand library (ImageMagick) in python and calculating the features using open cv2 for later on some other image matching. The is the following
from wand.image import Image
import cv2 as cv
import logging
with Image(filename="processing.pdf[0]", resolution=500) as img:
img.compression_quality = 100
img.format = "png"
img.save(filename="temp.png")
detector = cv.BRISK_create()
img1 = cv.imread("temp.png", 0)
kp1, desc1 = detector.detectAndCompute(img1, None)
logging.warn('img1 - %{0} features'.format(len(kp1)))
For some reason I get different number of features in windows and linux Windows
2018-08-22 01:45:21,235 - INFO - img1 - %44509 features
Linux
2018-08-22 05:41:54,891 - INFO - img1 - %48371 features
I am using the following dependency in python
opencv-python==3.4.0
Wand==0.4.4
ImageMagick 6.8.9 installed.
If I use the same image (copy the image from windows machine to linux machine) and execute the code without converting PDF, the number of features is almost the same.
I know there are differences between the linux/windows codecs however I am looking for a decent solution or workaround to make the behavior as close as possible to between both environments. Thanks in advance.