如何定义采样二进制图像的像素密度 [英] How to define Pixel Density of a sampled binary image
本文介绍了如何定义采样二进制图像的像素密度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
我想说你的所有样本都有4 x 4 = 16像素。如果原始图像是二进制图像,则该样本的密度仅为4乘4平方的1个像素的数量。或者您可能希望将该数字除以16以将结果标准化为区间[0,1]。
图像的M00时刻定义为总和其像素的灰度值。因此,对于每个4乘4平方,像素数等于图像那部分的M00。
希望有所帮助。
hi, this may be a very simple matter, but i have conflict with that. I have split a particular binary image(28 x 28) into (4 x 4) samples. Now i want to calculate the pixel densities of each sample(i use those density values as features in a OCR application). As i know density defines the number of pixels in a particular area, like 7 pixels per square inch. Is that the same in here? all of my samples have 4 pixels. Is there are relationship between Moment->m00 and pixel density ? can someone explain this ? plz help
解决方案
I would say that all of your samples have 4 x 4 = 16 pixels. If the original image is a binary image, the density of that sample is simply the number of 1 pixels in that 4 by 4 square. Or you might want to divide that number by 16 to normalize the result to the interval [0,1].
The moment M00 of an image is by definition the sum of the gray values of its pixels. For each 4 by 4 square the number of pixels is hence equal to M00 of that part of your image.
Hope that helps.
这篇关于如何定义采样二进制图像的像素密度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文