mirror of
https://gitee.com/dromara/easyAi.git
synced 2024-12-01 19:28:29 +08:00
增加图像中心化处理
This commit is contained in:
parent
1c2c3ab9b5
commit
06582631d0
@ -85,6 +85,17 @@ public class ThreeChannelMatrix {
|
||||
}
|
||||
}
|
||||
|
||||
public void center() throws Exception {
|
||||
center(matrixR);
|
||||
center(matrixG);
|
||||
center(matrixB);
|
||||
}
|
||||
|
||||
private void center(Matrix matrix) throws Exception {
|
||||
double avg = matrix.getAVG();
|
||||
matrixOperation.mathSub(matrix, avg);
|
||||
}
|
||||
|
||||
public ThreeChannelMatrix copy() throws Exception {//复制当前的三通道矩阵并返回
|
||||
ThreeChannelMatrix copyThreeChannelMatrix = new ThreeChannelMatrix();
|
||||
copyThreeChannelMatrix.setX(this.x);
|
||||
|
Loading…
Reference in New Issue
Block a user