mirror of
https://gitee.com/open-visual/face-search.git
synced 2025-07-25 19:41:42 +08:00
update: 修改由于OpenCV3.4不兼容的API
This commit is contained in:
parent
c788dc4bd9
commit
a4b6e35559
@ -167,7 +167,7 @@ public class ImageMat implements Serializable {
|
||||
* @return
|
||||
*/
|
||||
public Point center(){
|
||||
return new Point(mat.size(1)/2, mat.size(0)/2);
|
||||
return new Point(1.0 * mat.width()/2, 1.0 * mat.height() / 2);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -333,7 +333,7 @@ public class ImageMat implements Serializable {
|
||||
*/
|
||||
private ImageMat blobFromImage(double scale, Scalar mean, boolean swapRB, boolean release){
|
||||
try {
|
||||
Mat dst = Dnn.blobFromImage(mat, scale, new Size( mat.cols(), mat.rows()), mean, swapRB);
|
||||
Mat dst = Dnn.blobFromImage(mat, scale, new Size( mat.cols(), mat.rows()), mean, swapRB, false);
|
||||
java.util.List<Mat> mats = new ArrayList<>();
|
||||
Dnn.imagesFromBlob(dst, mats);
|
||||
dst.release();
|
||||
|
Loading…
x
Reference in New Issue
Block a user