|
|
|
|
@ -148,11 +148,16 @@ public class IndustrialCameraController {
|
|
|
|
|
boolean re = false;
|
|
|
|
|
//sick识别
|
|
|
|
|
String code = SickSocket.readOCR(configProperties.getCameraConfig().getSickIp(), configProperties.getCameraConfig().getSickPort());
|
|
|
|
|
String pa = "";
|
|
|
|
|
//2d识别
|
|
|
|
|
if (listResult.getData().size()!=0){
|
|
|
|
|
for(String path:listResult.getData()){
|
|
|
|
|
re = FeatureMatchingExample.matchTemplate(
|
|
|
|
|
InventoryService.readImagesInFolder(configProperties.getSavePath().getMediaPath() + "template/" + industrialCameraVo.getTypeMacth()),
|
|
|
|
|
configProperties.getSavePath().getMediaPath() +listResult.getData().get(0));
|
|
|
|
|
configProperties.getSavePath().getMediaPath() +path);
|
|
|
|
|
if (re){
|
|
|
|
|
pa = path;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//3d pcd保存
|
|
|
|
|
LocalDate currentDate = LocalDate.now();
|
|
|
|
|
@ -176,7 +181,7 @@ public class IndustrialCameraController {
|
|
|
|
|
kuKou.setCode(code);
|
|
|
|
|
kuKou.setWmsCount(industrialCameraVo.getCount());
|
|
|
|
|
kuKou.setWmsCode(industrialCameraVo.getCode());
|
|
|
|
|
kuKou.setPath(configProperties.getSavePath().getNetPicPath()+listResult.getData().get(0)+".jpg");
|
|
|
|
|
kuKou.setPath(configProperties.getSavePath().getNetPicPath()+pa+".jpg");
|
|
|
|
|
kuKouService.save(kuKou);
|
|
|
|
|
serialPortExample.openLight(0);
|
|
|
|
|
return new Result<>(kuKou);
|
|
|
|
|
|