Matlab - 用左侧的像素替换连续的像素
因此,我用四个量化值量化了灰度图像。我试图保留量化图像每行的第一个像素,并用其左侧像素的差值替换每个连续像素。
你会如何在 matlab 中对此进行编码?有人可以从概念上向我解释一下吗?
另外,我担心的是,由于动态范围的量化,图像相对均匀,因此大部分图像会显得黑色,不是吗?在我看来,只有过渡区域和边缘的量化值会有一些差异。
So, I've quantized a grayscale image with four quantized values. I'm trying to maintain the first pixel of each row of the quantized image and replace each successive pixel with the difference from the pixel to its left.
How would you code this in matlab and can someone explain this to me conceptually?
Also, my concern is that because the image is relatively uniform because of the quantization of the dynamic range, most of the image would appear black, no? It seems to me that only the transition areas and the edges will have some difference in quantized values.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要创建与左侧像素的差异,您所要做的就是从第 2,3,4 列中减去第 1,2,3...列中的像素...
是的,您会期望有相当多的像素均匀的补丁(它将是灰色的,因为除非你绘制差异的绝对值,否则会有一些是负的)。
To create the difference to the pixel on the left, all you have to do is subtract the pixels in columns 1,2,3... from the columns 2,3,4...
Yes, you'd expect quite a few uniform patches (which will be gray, since unless you plot the absolute value of the differences, there will be some that are negative).