在 Matlab 中计算子图像的光密度
我有一张 RGB 图像。我想计算该图像某个区域的光密度。
我已将图像转换为灰度,并且我知道光密度的公式是 log(1/照度)。
我的程序是使用 roiploy 来指定 ROI。但这是行不通的,我从来没有得到统一的答案。
最好的方法是什么?我应该使用面膜吗?掩模和原始图像之间的相关性有帮助吗?
I have a RGB image. I want to compute the Optical Density of a region of that image.
I have converted the Image to grayscale and I know the formula for Optical Density is log(1/illumination).
My procedure is to use roiploy to specify the ROI. But however this is not working and I never get a uniform answer.
What is the best way to do this? Should I use a mask? Will correlation be of any help between the mask and the original image?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你从 roipoly 得到的是一个遮罩 - 你需要将其应用到你的图像中:
然后,遮罩图像的每个像素都有一个与其照明相对应的值,假设它来自 CCD 相机。
顺便说一句,我对光密度的公式有点怀疑——当照明为零时会发生什么?
What you get from roipoly is a mask - you need to apply that to your image with:
Then each pixel of the masked image has a value corresponding to its illumination, assuming it came from a CCD camera.
As an aside, I'm a bit dubious about that formula for optical density - what happens when the illumination is zero?