处理大量图片
我的程序以大约 30fps 的速率保存来自相机的图像; 移动这些图像或通过 Windows 资源管理器浏览它们需要很长时间。
我的问题是: 将它们存储为视频文件是更好的方法吗?因此移动文件不会花费很多时间。 (如果这个好的话,如何打开一个大的视频文件并快速获取指定的帧数?这种方法更快吗?)
My program save images from a camera in a rate about 30fps;
Moving these images or browsing them by windows explorer take a long time.
My questions is:
is storing them as a video file is a better approach? so moving files wouldn't take a lot of time. (if this is good, how to open a large video file and get a specified frame number fast? Is this approach faster?)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
视频文件的加载或搜索速度不太可能比单个图像文件快。更不用说这将比图像更难处理,并且可能会给您的应用程序引入一堆额外的、不必要的依赖项。
如果您确实需要一种加快图像浏览速度的方法,您应该考虑生成单独的缩略图 图像。 缩略图是原始图像的精确副本,但尺寸和质量显着减小,仅适合显示目的。这使得生成的缩略图显着小于原始图像,这应该会大大加快其加载和渲染速度。这个技巧在图形包和文件管理器中都有使用。这种方法允许您延迟加载关联完整图像的昂贵过程,直到用户选择要打开的特定缩略图图像之后。
It's very unlikely that a video file will load or seek any faster than individual image files. Not to mention this is going to be a lot more difficult to handle than images, and probably introduce a bunch of extra, unnecessary dependencies to your application.
If you really need a way to speed up image browsing, you should look into generating separate thumbnail images. Thumbnails are exact duplicates of the original images, but with significant reductions in size and quality, suitable for display purposes only. This makes the resulting thumbnail images significantly smaller than the originals, which should speed up their loading and rendering substantially. This trick is used all over graphics packages and file managers. This approach allows you to delay the expensive process of loading the associated full image until after the user selects a particular thumbnail image to open.