Opencv无损压缩 [英] Opencv lossless compression

查看:503
本文介绍了Opencv无损压缩的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨同胞CP'ians,

有没有人碰巧知道编解码器与无损压缩的openCV编码视频一起使用?问题是,由于视频文件被加密,我需要一个不会改变RGB值的编解码器。否则加密就会丢失。



我已经在 SO [ ^ ]但是给定的答案都不适合我。如果你能为我提供一个你知道或分享一些知识的指南,我会很乐意。




提前致谢:)



编辑:

更精确,因为我想我不清楚我想要什么,这里是我的问题的修订版。



我尝试使用OpenCV处理视频,并使用隐写方法将信息隐藏在单帧中。在保存视频期间,压缩也可以通过编解码器完成,然后交给视频记录器。要获取隐藏的信息,因为我想在这些步骤之后稍后解密,所以不允许更改RGB值。



据我尝试过,压缩总是在使用OpenCV保存期间完成。所以我无法扭转这些步骤?因为如果我压缩视频并在之后输入加密,我仍然需要再次保存它然后压缩再次点击?

可能有一个设置,您可以在保存时禁用压缩或是有一个特定的编解码器用于此目的。

有人可能知道如何使用下面编写的编解码器吗?



提前感谢:)



我尝试过的事情:



我已经看过CorePNG,Lagarith,MotionPNG,但我不知道知道如何使用它们。它告诉我找不到编码器。

解决方案

如果视频已加密,我怀疑你是否会得到任何压缩,如果没有很少。



为了获得最佳效果,必须首先压缩视频,然后加密。


引用:

问题是因为视频文件被加密了我需要一个不会改变RGB值的编解码器。否则加密就会丢失。

你得到了错误的方法。

事情以相反的顺序工作。

你可以使用压缩或加密的标准工具进行测试。

将2种方式的结果与样本文件进行比较

获取数据文件>>加密>>压缩

获取数据文件>>压缩>>加密

你会看到哪一个是自己动手的。



正确的方法是:

获取数据文件>>压缩>>加密


Hi fellow CP'ians,
does anyone happen to know a codec to use with openCV encoding videos with lossless compression? Problem is since the videofiles get encrypted i need a codec that doesn't change the RGB values. Otherwise the encryption gets lost.

I already found this on SO[^] but none of the given answers work for me. If you could provide me a guide you know or share some knwoledge i would appretiate it.


Thanks in advance :)

Edit:
TO be more precise since i guess i was quite unclear on what i wanted, here a "revision" of my Question.

I try to process videos with OpenCV and hide information in single frames using steganographic methods. During saving of the video the compression gets also done with the codec i hand to the videowriter. To get the hidden information back, since i want to decrypt it later after these steps, the RGB values are not allowed to be changed.

As far as i tried it out, the compression gets always done during the save with OpenCV. So i can't reverse the steps? Because if i compress the video and put in the "encryption" later i still have to save it again and then the compression hits again?
Might there be a setting where you can disable compression on saving or is there a specific codec for this purpose.
Does someone maybe have an idea how to use to codecs written below?

Thanks in advance :)

What I have tried:

I already saw CorePNG, Lagarith, MotionPNG but i don't know how to use them. It tells me the encoder can't be found.

解决方案

If the videos are already encrypted, I doubt you're going to get any compression at all, if not very little.

For the best result, the video would have to be compressed first, then encrypted.


Quote:

Problem is since the videofiles get encrypted i need a codec that doesn't change the RGB values. Otherwise the encryption gets lost.

You got the wrong approach.
Things work in reverse order.
you can do tests with standard tools that do compression or encryption.
Compare the results of the 2 ways with sample files
Get data files >> Encrypt >> Compress
Get data files >> Compress >> Encrypt
You will see which one works by yourself.

The right way is :
Get data files >> Compress >> Encrypt


这篇关于Opencv无损压缩的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆