Tooth emphatic image via color channels manipulation

Hey all,

First time here. I’ve been building web applications for over a decade as a part-time job/hobby. Recently I was accepted as a Ph.D student. My research progress is in an exploratory state at the moment, and I need to replicate a paper’s result to see if the introduced algorithm is good in my use case.
All my efforts to contact the author have been unsuccessful, and I’ve spent almost a month on this problem. So here I am, asking questions in this forum.

The paper is titled: Individual tooth region segmentation using modified watershed algorithm with morphological characteristic. (You can get the full text here)

In figure 1, A is G channel, B is red channel, C is called tooth complement (which is cv2.subtract(r,g) in code).

I couldn’t figure out how to replicate the D based on the description from the paper. I’ve pasted the relevant parts below:

Emphatic tooth image was obtained in preprocessing using the RGB (red, green, blue) space from the difference on the gingival and oral tooth muscle. The tooth regions similarly appear on a histogram of the R, G, and B on the RGB space; however, a histogram of the R intensity appears, except for tooth regions. In summary, the complement and emphatic images of the tooth were acquired using the RGB space difference. Figure 1 shows the results of the experiment using the difference in the RGB space

Original image on github

Could you explain to me how was figure 1.D made? English explanation or python code would be much appreciated.

Thank you very much for your time.

just play around with the gains. make little opencv GUI with some trackbars letting you mix the channels with gains of -2 to +2, or do it manually.

when you look at (c = R-G), that shows the gums, and when you look at (a = G) which still has some gums, you might wanna subtract that, so…

G - (R-G) = G + G - R = 2*G - R

image

1 Like

Edit: I’ve done it. Silly me, need to remember to use cv2.* instead of normal operations:

cv2.subtract(g,cv2.subtract(r,g))

Did you do anything special except G-(R-G) to have that results? When I punch in G-(R-G), the result looks totally different:

My code:

from matplotlib import pyplot as plt
import numpy as np
import cv2

image =cv2.imread("./im-original.png", cv2.IMREAD_UNCHANGED)
b, g, r = cv2.split(image)

plt.figure()
plt.imshow(g-(r-g), cmap="gray")
plt.show();