ww23 / BlindWatermark

Java 盲水印
Apache License 2.0
413 stars 105 forks source link

当使用DCT方式且图片的宽高有奇数的时候会报错 #6

Closed okavatar closed 5 years ago

okavatar commented 5 years ago

` Exception in thread "main" java.lang.RuntimeException: OpenCV(3.4.2) C:\projects\javacpp-presets\opencv\cppbuild\windows-x86_64\opencv-3.4.2\modules\core\src\dxt.cpp:4149: error: (-213:The function/fe ature is not implemented) Odd-size DCT's are not implemented in function 'cv::OcvDctImpl::apply'

    at org.bytedeco.javacpp.opencv_core.dct(Native Method)
    at me.ww23.image.BlindWatermark.startDCT(BlindWatermark.java:254)
    at me.ww23.image.BlindWatermark.decodeDCT(BlindWatermark.java:186)
    at me.ww23.image.BlindWatermark.main(BlindWatermark.java:64)

` 麻烦大佬看看谢谢

okavatar commented 5 years ago

是不是可以去掉一根1像素的线进行运算,算完了再把这根线补回去输出图像。

ww23 commented 5 years ago

反过来应该比较好,先补一像素,加完水印再去掉,不会丢失一像素的信息。

okavatar notifications@github.com 于2019年1月11日周五 上午11:03写道:

是不是可以去掉一根1像素的线进行运算,算完了再把这根线补回去输出图像。

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ww23/BlindWatermark/issues/6#issuecomment-453358734, or mute the thread https://github.com/notifications/unsubscribe-auth/AOhPkaVK9y84ftiNva4XgjBEreQ_qz5Zks5vB_73gaJpZM4Z357p .

Jimmy6l commented 3 years ago

楼主解决了吗