org.opencv.android.Utils.matToBitmap()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(7.3k)|赞(0)|评价(0)|浏览(294)

本文整理了Java中org.opencv.android.Utils.matToBitmap()方法的一些代码示例,展示了Utils.matToBitmap()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.matToBitmap()方法的具体详情如下:
包路径:org.opencv.android.Utils
类名称:Utils
方法名:matToBitmap

Utils.matToBitmap介绍

[英]Short form of the matToBitmap(mat, bmp, premultiplyAlpha=false)
[中]MattBitMap的缩写形式(mat、bmp、premultiplyAlpha=false)

代码示例

代码示例来源:origin: kongqw/OpenCVForAndroid

/**
 * Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
 * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
 * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
 */
public static void matToBitmap(Mat mat, Bitmap bmp) {
  matToBitmap(mat, bmp, false);
}

代码示例来源:origin: ytai/IOIOPlotter

/**
 * Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
 * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
 * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
 */
public static void matToBitmap(Mat mat, Bitmap bmp) {
  matToBitmap(mat, bmp, false);
}

代码示例来源:origin: leadrien/opencv_native_androidstudio

/**
 * Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
 * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
 * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
 */
public static void matToBitmap(Mat mat, Bitmap bmp) {
  matToBitmap(mat, bmp, false);
}

代码示例来源:origin: tz28/Chinese-number-gestures-recognition

/**
 * Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
 * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
 * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
 */
public static void matToBitmap(Mat mat, Bitmap bmp) {
  matToBitmap(mat, bmp, false);
}

代码示例来源:origin: SOFTPOWER1991/OpenCVCheck

/**
 * Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
 * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
 * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
 */
public static void matToBitmap(Mat mat, Bitmap bmp) {
  matToBitmap(mat, bmp, false);
}

代码示例来源:origin: SouvDc/face-detection

/**
 * Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
 * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
 * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
 */
public static void matToBitmap(Mat mat, Bitmap bmp) {
  matToBitmap(mat, bmp, false);
}

代码示例来源:origin: farkam135/GoIV

/**
 * Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
 * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
 * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
 */
public static void matToBitmap(Mat mat, Bitmap bmp) {
  matToBitmap(mat, bmp, false);
}

代码示例来源:origin: ctodobom/OpenCV-3.1.0-Android

/**
 * Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
 * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
 * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
 */
public static void matToBitmap(Mat mat, Bitmap bmp) {
  matToBitmap(mat, bmp, false);
}

代码示例来源:origin: akshika47/OpencvAndroid

/**
 * Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
 * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
 * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
 */
public static void matToBitmap(Mat mat, Bitmap bmp) {
  matToBitmap(mat, bmp, false);
}

代码示例来源:origin: InnoFang/Android-Code-Demos

/**
 * Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
 * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
 * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
 */
public static void matToBitmap(Mat mat, Bitmap bmp) {
  matToBitmap(mat, bmp, false);
}

代码示例来源:origin: raulh82vlc/Image-Detection-Samples

/**
 * Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
 * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
 * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
 */
public static void matToBitmap(Mat mat, Bitmap bmp) {
  matToBitmap(mat, bmp, false);
}

代码示例来源:origin: imistyrain/EasyPR4Android

/**
 * Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
 * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
 * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
 */
public static void matToBitmap(Mat mat, Bitmap bmp) {
  matToBitmap(mat, bmp, false);
}

代码示例来源:origin: DuckDeck/AndroidDemo

/**
 * Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
 * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
 * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
 */
public static void matToBitmap(Mat mat, Bitmap bmp) {
  matToBitmap(mat, bmp, false);
}

代码示例来源:origin: abhn/marvel

/**
 * Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
 * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
 * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
 */
public static void matToBitmap(Mat mat, Bitmap bmp) {
  matToBitmap(mat, bmp, false);
}

代码示例来源:origin: jtsky/EasyPR_Android

/**
 * Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
 * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
 * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
 */
public static void matToBitmap(Mat mat, Bitmap bmp) {
  matToBitmap(mat, bmp, false);
}

代码示例来源:origin: KePeng1019/SmartPaperScan

/**
 * Short form of the <b>matToBitmap(mat, bmp, premultiplyAlpha=false)</b>
 * @param mat is a valid input Mat object of the types 'CV_8UC1', 'CV_8UC3' or 'CV_8UC4'.
 * @param bmp is a valid Bitmap object of the same size as the Mat and of type 'ARGB_8888' or 'RGB_565'.
 */
public static void matToBitmap(Mat mat, Bitmap bmp) {
  matToBitmap(mat, bmp, false);
}

代码示例来源:origin: ytai/IOIOPlotter

private void generatePreview() {
  double totalTime = renderPreview(blur_, threshold_, mode_);
  Utils.matToBitmap(previewImage_, previewBitmap_);
  final Bitmap bmp = previewBitmap_;
  synchronized (this) {
    if (listener_ != null) {
      listener_.previewFrame(bmp, totalTime);
    }
  }
}

代码示例来源:origin: abhn/marvel

IplImage MatToIplImage(Mat m,int width,int heigth)
{
  Bitmap bmp=Bitmap.createBitmap(m.width(), m.height(), Bitmap.Config.ARGB_8888);
  Utils.matToBitmap(m, bmp);
  return BitmapToIplImage(bmp,width, heigth);
}

代码示例来源:origin: InnoFang/Android-Code-Demos

private void convertGray() {
  Mat src = new Mat();
  Mat temp = new Mat();
  Mat dst = new Mat();
  Utils.bitmapToMat(selectbp, src);
  Imgproc.cvtColor(src, temp, Imgproc.COLOR_BGRA2BGR);
  Log.i("CV", "image type:" + (temp.type() == CvType.CV_8UC3));
  Imgproc.cvtColor(temp, dst, Imgproc.COLOR_BGR2GRAY);
  Utils.matToBitmap(dst, selectbp);
  myImageView.setImageBitmap(selectbp);
}

代码示例来源:origin: tz28/Chinese-number-gestures-recognition

private Bitmap scaleImage(Bitmap bitmap, int width, int height)
{
  Mat src = new Mat();
  Mat dst = new Mat();
  Utils.bitmapToMat(bitmap, src);
  //new Size(width, height)
  Imgproc.resize(src, dst, new Size(width,height),0,0,Imgproc.INTER_AREA);
  Bitmap bitmap1 = Bitmap.createBitmap(dst.cols(),dst.rows(),Bitmap.Config.RGB_565);
  Utils.matToBitmap(dst, bitmap1);
  return bitmap1;
}

相关文章