The simple answer to your question is, "Yes there are algorithms, but none of them are very good." As you mentioned in the question, the limiting factor is the need to invent pixels in order to increase resolution beyond a small amount. (That's why you can't really read a license plate number from the reflection in someone's glasses off of a photo taken from a CCTV security camera, like they do in CSI: Miami.)
If all you want to do is create a larger image (for a wall hanging, or such like) then you can use a plugin for Photoshop that will smooth transitions between pixels using existing information. It can't create new pixels, but it can get rid of that boxy, pixelated look.
Addendum to the previous answers: Please note that the answer to your question depends heavily on what exactly you mean by resolution - of the display device, of the capture device, or of the viewing device (i.e., the human eye.) I assume you're talking about raster images (the problem wouldn't exist for vector images.)
You must accept that a picture taken at a higher resolution will contain more image information (i.e. details) than a picture of the same scene taken at a lower resolution. There is no way to add this information out of thin air. Scaling algorithms synthesize some information based on the assumption of continuity between the discrete raster image elements. That "new" information is not actually new but derived from the pre-existing picture information, hence it cannot be considered to have a 100% probability of matching the original scene. Better algorithms might yield better probabilities, but their results will always have a match probability of less than 1.
Enlarging images is risky. Beyond a certain point, enlarging images is a fool's errand; you can't magically synthesize an infinite number of new pixels out of thin air. And interpolated pixels are never as good as real pixels. That's why it's more than a little artificial to upsize the 512x512 Lena image by 500%. It'd be smarter to find a higher resolution scan or picture of whatever you need* than it would be to upsize it in software.
One way to increase resolution is to take multiple exposures, upsize them to 4x areal (2x linear both ways) and use stacking software to merge the images. The final image will be better than any of the originals.
You can try vectorizing the image with tools like autotrace or potrace and use it in whatever resolution you like. But it is computationally very costly so you end up with an image with few colors/features and even fewer if you need to work on its whole quickly.
Super-resolution algorithms might help in some cases. I don’t know all what’s involved (soft/hardware & initial images necessary), but if you’re interested, here’s some links:
Most decent image editors have smoothing/interpolating filters to do this kind of resizing/resampling, e.g. IrfanView which gives you several options for interpolation filters. See Lanczos resampling. ImageMagick's convert program allows you to do this also, after specifying a filter
If you need to do this algorithmically, check out the Image Scaling link suggested by Draemon. What platform will you be doing these interpolations on? Most graphics libraries will have a variety of approaches implemented, allowing you to balance speed against quality.
If you just need to resize some images, I recommend GIMP. It can resize images in a variety of ways, at least one of which should produce excellent results in any situation.
As others are pointing out, you can't expect a scaling method to invent information that isn't in the original image. So you can't expect it to be like the moments in CSI where they "zoom and enhance" to see the number on a license plate that was hopelessly blurred in the original image.
发布评论
评论(9)
插值:图像缩放
Interpolation: Image Scaling
有关实际算法,请查看图像插值。
对你的问题的简单回答是,“是的,有算法,但它们都不是很好。” 正如您在问题中提到的,限制因素是需要发明像素以将分辨率提高到超出少量。 (这就是为什么你无法真正从闭路电视监控摄像头拍摄的照片中某人眼镜的反射中读取车牌号,就像他们在《犯罪现场调查:迈阿密》中所做的那样。)
如果你想要的话要做的就是创建一个更大的图像(用于壁挂等),然后您可以使用 Photoshop 插件,将使用现有信息在像素之间平滑过渡。 它无法创建新像素,但可以消除四四方方的像素化外观。
For actual algorithms check out image interpolation.
The simple answer to your question is, "Yes there are algorithms, but none of them are very good." As you mentioned in the question, the limiting factor is the need to invent pixels in order to increase resolution beyond a small amount. (That's why you can't really read a license plate number from the reflection in someone's glasses off of a photo taken from a CCTV security camera, like they do in CSI: Miami.)
If all you want to do is create a larger image (for a wall hanging, or such like) then you can use a plugin for Photoshop that will smooth transitions between pixels using existing information. It can't create new pixels, but it can get rid of that boxy, pixelated look.
先前答案的附录:请注意,您问题的答案在很大程度上取决于您所说的分辨率的确切含义 - 显示设备、捕获设备或观看设备(即人眼)。我假设您谈论的是光栅图像(矢量图像不存在这个问题。)
您必须接受以更高分辨率拍摄的照片将比以更高分辨率拍摄的照片包含更多的图像信息(即细节)。以较低分辨率拍摄的同一场景。 无法凭空添加此信息。 缩放算法基于离散光栅图像元素之间的连续性假设来合成一些信息。 这个“新”信息实际上并不是新的,而是从预先存在的图片信息中衍生出来的,因此不能认为它有 100% 的概率与原始场景匹配。 更好的算法可能会产生更好的概率,但其结果的匹配概率始终小于 1。
Addendum to the previous answers: Please note that the answer to your question depends heavily on what exactly you mean by resolution - of the display device, of the capture device, or of the viewing device (i.e., the human eye.) I assume you're talking about raster images (the problem wouldn't exist for vector images.)
You must accept that a picture taken at a higher resolution will contain more image information (i.e. details) than a picture of the same scene taken at a lower resolution. There is no way to add this information out of thin air. Scaling algorithms synthesize some information based on the assumption of continuity between the discrete raster image elements. That "new" information is not actually new but derived from the pre-existing picture information, hence it cannot be considered to have a 100% probability of matching the original scene. Better algorithms might yield better probabilities, but their results will always have a match probability of less than 1.
来自杰夫·阿特伍德
From Jeff Atwood
提高分辨率的一种方法是进行多次曝光,将其放大到 4 倍面积(双向 2 倍线性)并使用堆叠软件合并图像。 最终图像将比任何原始图像更好。
One way to increase resolution is to take multiple exposures, upsize them to 4x areal (2x linear both ways) and use stacking software to merge the images. The final image will be better than any of the originals.
您可以尝试使用 autotrace 或 potrace 等工具对图像进行矢量化,并以您喜欢的任何分辨率使用它。 但它的计算成本非常高,因此您最终会得到一张颜色/特征很少的图像,如果您需要快速处理整个图像,则颜色/特征甚至更少。
You can try vectorizing the image with tools like autotrace or potrace and use it in whatever resolution you like. But it is computationally very costly so you end up with an image with few colors/features and even fewer if you need to work on its whole quickly.
超分辨率算法在某些情况下可能会有所帮助。
我不知道所涉及的所有内容(需要软/硬件和初始图像),但如果您感兴趣,这里有一些链接:
http://almalence.com/doc/superresolution-comparison/
(看起来 Almalence 的 PhotoAcute 的价格是本文中测试的最好的 - 30 美元或 150 美元)。 他们位于:www. photoacute dot com
Markov Random Fields for SR – 免费软件包(麻省理工学院和微软项目)
http://people .csail.mit.edu/billf/project%20pages/sresCode/Markov%20Random%20Fields%20for%20Super-Resolution.html
Super-resolution algorithms might help in some cases.
I don’t know all what’s involved (soft/hardware & initial images necessary), but if you’re interested, here’s some links:
http://almalence.com/doc/superresolution-comparison/
(Seems like Almalence’s PhotoAcute fares the best of the ones tested in this article - $30 or $150). They are at: www. photoacute dot com
Markov Random Fields for SR – a free software package (MIT & Microsoft project)
http://people.csail.mit.edu/billf/project%20pages/sresCode/Markov%20Random%20Fields%20for%20Super-Resolution.html
大多数像样的图像编辑器都有平滑/插值过滤器来执行这种调整大小/重新采样,例如 IrfanView ,它可以为您提供插值滤波器的几个选项。 请参阅Lanczos 重采样。 ImageMagick 的转换程序也允许您在指定过滤器后执行此操作
Most decent image editors have smoothing/interpolating filters to do this kind of resizing/resampling, e.g. IrfanView which gives you several options for interpolation filters. See Lanczos resampling. ImageMagick's convert program allows you to do this also, after specifying a filter
如果您需要通过算法执行此操作,请查看 Draemon 建议的图像缩放链接。 您将在什么平台上进行这些插值? 大多数图形库都会实施多种方法,使您能够在速度与质量之间取得平衡。
如果您只需要调整一些图像的大小,我推荐GIMP。 它可以通过多种方式调整图像大小,至少其中一种应该在任何情况下都能产生出色的效果。
正如其他人指出的那样,您不能指望缩放方法会发明原始图像中没有的信息。 所以你不能指望它会像《犯罪现场调查》中那样,通过“缩放和增强”来看到在原始图像中模糊不清的车牌号码。
If you need to do this algorithmically, check out the Image Scaling link suggested by Draemon. What platform will you be doing these interpolations on? Most graphics libraries will have a variety of approaches implemented, allowing you to balance speed against quality.
If you just need to resize some images, I recommend GIMP. It can resize images in a variety of ways, at least one of which should produce excellent results in any situation.
As others are pointing out, you can't expect a scaling method to invent information that isn't in the original image. So you can't expect it to be like the moments in CSI where they "zoom and enhance" to see the number on a license plate that was hopelessly blurred in the original image.