This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cv2 | |
| import numpy as np | |
| from skimage.metrics import structural_similarity as ssim | |
| def calculate_difference(img1_path, img2_path): | |
| # Load images | |
| img1 = cv2.imread(img1_path) | |
| img2 = cv2.imread(img2_path) | |
| # Ensure both images are the same size |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package test; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import com.sun.jna.Native; | |
| import com.sun.jna.Pointer; | |
| import com.sun.jna.platform.win32.WinDef.HWND; | |
| import com.sun.jna.platform.win32.WinUser.WNDENUMPROC; | |
| import com.sun.jna.win32.W32APIOptions; |