处理大量图片

发布于 2024-10-04 21:25:21 字数 160 浏览 0 评论 0原文

我的程序以大约 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

紫瑟鸿黎 2024-10-11 21:25:22

视频文件的加载或搜索速度不太可能比单个图像文件快。更不用说这将比图像更难处理,并且可能会给您的应用程序引入一堆额外的、不必要的依赖项。

如果您确实需要一种加快图像浏览速度的方法,您应该考虑生成单独的缩略图 图像 缩略图是原始图像的精确副本,但尺寸和质量显着减小,仅适合显示目的。这使得生成的缩略图显着小于原始图像,这应该会大大加快其加载和渲染速度。这个技巧在图形包和文件管理器中都有使用。这种方法允许您延迟加载关联完整图像的昂贵过程,直到用户选择要打开的特定缩略图图像之后。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文