mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 22:44:02 +08:00
Merge pull request #6397 from ioxp:androidCamLog
This commit is contained in:
commit
d02f17c39d
@ -2,6 +2,7 @@ package org.opencv.android;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.opencv.BuildConfig;
|
||||||
import org.opencv.R;
|
import org.opencv.R;
|
||||||
import org.opencv.core.Mat;
|
import org.opencv.core.Mat;
|
||||||
import org.opencv.core.Size;
|
import org.opencv.core.Size;
|
||||||
@ -409,7 +410,8 @@ public abstract class CameraBridgeViewBase extends SurfaceView implements Surfac
|
|||||||
Canvas canvas = getHolder().lockCanvas();
|
Canvas canvas = getHolder().lockCanvas();
|
||||||
if (canvas != null) {
|
if (canvas != null) {
|
||||||
canvas.drawColor(0, android.graphics.PorterDuff.Mode.CLEAR);
|
canvas.drawColor(0, android.graphics.PorterDuff.Mode.CLEAR);
|
||||||
Log.d(TAG, "mStretch value: " + mScale);
|
if (BuildConfig.DEBUG)
|
||||||
|
Log.d(TAG, "mStretch value: " + mScale);
|
||||||
|
|
||||||
if (mScale != 0) {
|
if (mScale != 0) {
|
||||||
canvas.drawBitmap(mCacheBitmap, new Rect(0,0,mCacheBitmap.getWidth(), mCacheBitmap.getHeight()),
|
canvas.drawBitmap(mCacheBitmap, new Rect(0,0,mCacheBitmap.getWidth(), mCacheBitmap.getHeight()),
|
||||||
|
@ -12,6 +12,7 @@ import android.util.AttributeSet;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.ViewGroup.LayoutParams;
|
import android.view.ViewGroup.LayoutParams;
|
||||||
|
|
||||||
|
import org.opencv.BuildConfig;
|
||||||
import org.opencv.core.CvType;
|
import org.opencv.core.CvType;
|
||||||
import org.opencv.core.Mat;
|
import org.opencv.core.Mat;
|
||||||
import org.opencv.core.Size;
|
import org.opencv.core.Size;
|
||||||
@ -283,7 +284,8 @@ public class JavaCameraView extends CameraBridgeViewBase implements PreviewCallb
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onPreviewFrame(byte[] frame, Camera arg1) {
|
public void onPreviewFrame(byte[] frame, Camera arg1) {
|
||||||
Log.d(TAG, "Preview Frame received. Frame size: " + frame.length);
|
if (BuildConfig.DEBUG)
|
||||||
|
Log.d(TAG, "Preview Frame received. Frame size: " + frame.length);
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
mFrameChain[mChainIdx].put(0, 0, frame);
|
mFrameChain[mChainIdx].put(0, 0, frame);
|
||||||
mCameraFrameReady = true;
|
mCameraFrameReady = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user