隐藏部分图像
我有一张 jpg
格式的图像。 我想在图像内的矩形上应用图像效果。 效果应该是人类无法识别图像背后的内容。 该效果应该具有可逆性功能,因此当有人应用该效果并向我发送图像时,我会在其上应用另一个滤镜并获得原始图片。
图像的另一部分(除矩形之外的整个图像(矩形大小和位置在过滤和去过滤过程中已知))不应被修改并且应该被人类识别。
一个例子是将人脸隐藏在图像中,而图像的其他部分仍然可见。
问题是:
- 图像是jpg形式的,并且不允许我更改格式,因此jpg压缩和jpg格式的其他问题会带来一些麻烦。
- 我刚刚获得图像,我应该应用过滤器并覆盖它,不应该存储源图片。
- 我应该使用哪个过滤器?我有一些图像处理知识,并且可以使用
OpenCV
和Aforge
。而且效果不应该是棋盘!
I have an image in jpg
format.
I want to apply image effect on a rectangle inside image.
the effect should do something that human could not recognize what is behind the image.
the effect should have the reversibility capability so when someone applying the effect and send me the image I apply another filter on it and get the original picture.
another part of image (whole image except that rectangle (rectangle size and position is known in both filtering and defiltering process)) should not be modified and should be recognizable by human.
an example would be hiding human face in an image in a way other part of image are still visible.
the problem is:
- image is in jpg form and I am not allowed to change the format, so jpg compression and other issues with jpg format make some troubles.
- I just get the image and I should apply filter and overwrite it, the source picture should not be stored.
- which filter should I use? I have some Image processing knowledge and I can use
OpenCV
andAforge
. and the effect shouldn't be checkboarding!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
是否需要进行像素变换?您能否直接编辑矩形(将所有像素变为黑色)并将原始数据存储在 JPEG 的元数据中?您甚至可以对其进行加密。您将拥有它的完美版本,任何查看该图像的人都看不到它。
Does it need to be a pixel transformation? Could you just redact the rectangle (turn all pixels to black) and store the original in meta-data in the JPEG? You could even encrypt it. You would have a perfect version of it, and anyone looking at the image wouldn't be able to see it.
如果这是您的序列:
它不完全可逆,正是您提到的原因:jpg 是有损的,即使在最高质量的设置下也是如此。
If this is your sequence:
It is not perfectly reversible, for exactly the reason you mention: jpg is lossy, even at the highest-quality setting.
您可以做的是在图像中特定部分的所有像素之间应用排列,您可以执行相反的过程来恢复图像。
What you can do is apply a permutation between all the pixels of that specific part in your image, you can do the opposite process to get your image back.