|
|
|
@ -61,6 +61,7 @@ public class Operation {//进行计算
|
|
|
|
|
public void colorStudy(ThreeChannelMatrix threeChannelMatrix, int tag, List<Specifications> specificationsList) throws Exception {
|
|
|
|
|
Watershed watershed = new Watershed(threeChannelMatrix.getMatrixRGB(), specificationsList, templeConfig);
|
|
|
|
|
List<RegionBody> regionBodies = watershed.rainfall();
|
|
|
|
|
if (regionBodies.size() == 1) {
|
|
|
|
|
RegionBody regionBody = regionBodies.get(0);
|
|
|
|
|
int minX = regionBody.getMinX() + dif;
|
|
|
|
|
int minY = regionBody.getMinY() + dif;
|
|
|
|
@ -103,6 +104,9 @@ public class Operation {//进行计算
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
} else {
|
|
|
|
|
throw new Exception("Parameter exception");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void knnStudy(int tagging, Matrix vector) throws Exception {
|
|
|
|
|