java逐步通过图像像素获取值
所以我想计算图像中每个像素的值。我将读入一幅图像,然后我需要将该图像分割成若干窗口,然后在每个窗口中移动每个像素,并计算这些像素的值
有没有关于我将如何进行这方面的想法或任何有用的链接,你认为可能会有所帮助
我有下面的伪代码概要,如果这能让它更清楚的话
Int w=8;
Int n=256;
Int nblock=n/w;
Double s=0;
For (int i=0;i<nblock;i++) {
For (int j=0;j<nblock;j++) {
// put the gray value of the content of the block (i,j) into an array for both images (one array per image)
// compute the mean, sd, covariance for the arrays you got
// use the equation of the structural similarity measure to get a value v en.wikipedia.org/wiki/Structural_similarity
s+=v;
}
}
v=v/(nblock*nblock)
共 (0) 个答案