I’m working on a project to detect Omega-like wrinkles in the forehead (a diagnostic feature of depression). I found Hessian filter to be a good way to detect wrinkles based on this paper:
Yap, M. H., Alarifi, J., Ng, C., Batool, N., & Walker, K. (2019). Automated Facial Wrinkles Annotator. In Lecture notes in computer science (pp. 676–680). https://doi.org/10.1007/978-3-030-11018-5_5
I used skimage’s hessian filter although not optimal according to this but it’s enough in my case.
I applied the following in order:
- Gaussian blur.
- Hessian filter.
- Closing operation.
Here’s my code:
image = io.imread("1.jpg", as_gray=True)
image = cv2.GaussianBlur(image, (5,5), 0)
hessian_image = filters.hessian(image)
kernel = np.ones((5,5), np.uint8)
closing = cv2.morphologyEx(hessian_image, cv2.MORPH_CLOSE, kernel)
closing = np.array(np.divide(closing, np.amax(closing)), dtype=np.float64)
closing *= 255
closing = np.uint8(closing)
cv2.imshow("Closing", closing)
cv2.waitKey(0)
Here’s an input image:
Here’s the output image:
I cannot detect the Omega-like (or rectangle-like) shape using template matching since they tend to vary from one image to another. Do you have any other ideas ?