manvydasu / dwt-dct-watermark-csharp

Implementation of DWT-DCT image watermarking algorithm using c#
0 stars 0 forks source link

I can't understand why a watermark image is needed as input when extracting the watermark #1

Open bodong1987 opened 2 years ago

bodong1987 commented 2 years ago

If I already know the original watermark image, why should I still extract it?

public static Image ExtractWatermark(Bitmap watermarkedImage, Bitmap watermarkImage)
{
    var (redWatermarked, _, _) = BitmapUtils.GetRGB(watermarkedImage);
    var (redWatermark, _, _)   = BitmapUtils.GetRGB(watermarkImage);

    var grayscaleWatermark = TransformColorSpaceIntoGreyscale(redWatermark);

    return ExtractDwtDctWatermark(redWatermarked, grayscaleWatermark);
}
manvydasu commented 2 years ago

Hello @sczybt

I believe that we only need the size of watermark. Code could be improved. I did rush a bit when writing it, but inside the function it seems like only dimensions of watermark are needed.

Anyway, you can find deeper explanation in paper, which explains algorithm -> https://www.researchgate.net/publication/26621646_Combined_DWT-DCT_digital_image_watermarking

Edited my answer since I mis-read your question ar first. Apologies