Junaid Sultan
Junaid Sultan

Reputation: 351

Multiply Images In OpenCv & Apply Laplacian Filter On It

In my previous question here's the link. According to the answer I have obtained the desired image which is white flood filled. Now after applying the morphological operation of erosion on the white flood filled image, I get the new masked image.

Your answer helped a lot. Now what I am trying to do is that I am multiplying the new masked image with the original grayscaled image in order to get the veins pattern. But it gives me the same image as result which I get after performing erosion on the white flood filled image. After completing this step I have to apply the Laplacian function to get the veins pattern. I am attaching the original image and the result image that I want. I hope you will look into the matter. Original Image. Original Image

Result Image. Result Image

Upvotes: 0

Views: 665

Answers (2)

MyBushisaNeonJungle
MyBushisaNeonJungle

Reputation: 41

If I am right in understanding you, you only want to extract the veins from the grayscale hand image, right? To do something like this, you would obviously multiply both of them as,

finalimg = grayimg * veinmask;

If you have done the above I think it would be more helpful to post a portion of your code so experts here might be able to point out whats wrong, also the output image that you're getting, and the one you want would also help.

Upvotes: 1

Piglet
Piglet

Reputation: 29004

I hope I understand you correctly. You have a gray scale image showing a hand (first image in your question) You create a mask image that looks like the second image you posted.

Multiplication of both results in the mask image?

If that is the case check your values. If you work within a byte image your mask image must contain values 0 and 1, not 0 and 255 as the multiplication results for non-zero mask pixels otherwise exceed 255!

Upvotes: 0

Related Questions