| | |
| | |
|
| | | public static native void dbgFaceAdd(NativeImg faceImage);
|
| | | public static native String dbgGetLog();
|
| | |
|
| | | public static native void dbgSetStfaceLicense(String lic);
|
| | |
|
| | | public static int COMPANY_ID = 1001;
|
| | |
|
| | |
| | | RefByteArray faceListPb = new RefByteArray();
|
| | |
|
| | | try {
|
| | | COMPANY_ID = Integer.parseInt(BaseApplication.getInstance().getDevice().getDeviceCompanyId());
|
| | | COMPANY_ID = Integer.parseInt(BaseApplication.getInstance().getDevice().getCompanyId());
|
| | | } catch (Exception e) {
|
| | | COMPANY_ID = 0;
|
| | | }
|
| | |
| | | }
|
| | |
|
| | | try{
|
| | |
|
| | | List<SurveillanceQueryItem> bitmapList = new ArrayList();
|
| | | for (int i = 0; i < faceImages.size(); i++) {
|
| | | NativeImg item = faceImages.get(i);
|
| | |
| | | Bitmap bitmap = Bitmap.createBitmap(item.width,item.height, Bitmap.Config.ARGB_8888);
|
| | | ByteBuffer byteBuffer = ByteBuffer.wrap(item.image, offset, size);
|
| | | bitmap.copyPixelsFromBuffer(byteBuffer);
|
| | | // surveillanceQueryItem.setBase64Image(Base64.encodeToString(item.image, offset, size, Base64.DEFAULT));
|
| | | // String str = Base64.encodeToString(item.image, offset, size, Base64.DEFAULT);
|
| | | // System.out.println(str.length());
|
| | | // System.out.println(str);
|
| | | // surveillanceQueryItem.setBase64Image(str);
|
| | | surveillanceQueryItem.setNativeImg(item);
|
| | | surveillanceQueryItem.setBitmap(bitmap);
|
| | | surveillanceQueryItem.setWidth(item.width+"");
|
| | | surveillanceQueryItem.setHeight(item.height+"");
|