BebopVideoView to Mat


thread management… You don’t want to leave the cv processing thread running while the activity is not active.

resume starts the thread and pause tears it down

Construct cv::Mat from the frame Bebop send to iOS (ARCONTROLLER_Frame_t)

I am working on an image processing app on bebop drone and I am facing the same problem, i.e., the taken image is black:( My template is parrot sample project At first, i changed BebobVideoView into TextureView. Then, when I try to get image from BebobActivity as

final Bitmap bit = mVideoView.getBitmap();
ImageView im = (ImageView) findViewById(;

the image is black. So I tried to create class in original BebopActivity class, where the new class extends thread. The process of taking bitmap is then run in an own thread as is it seen in synman example but again the image is black:(

Can someone please post working BebopActivity where working getBitmap() is shown? Thank you


I have used to take CVClassifierView and create own view of this class. In bebobActitivity I take the id and call resume. I the CVClassifierView, i try to paint the bitmap, but again, the output is black:(


Solved:) It has needed to append "this.setSurfaceTextureListener(this); " into the bebopVideoView



I guess @mastemace comment would mean the code below.


private void initIHM() {
      mVideoView = (BebopVideoView) findViewById(;


public BebopVideoView(Context context) {
    this(context, null);

public BebopVideoView(Context context, AttributeSet attrs) {
    this(context, attrs, 0);

public BebopVideoView(Context context, AttributeSet attrs, int defStyleAttr) {
    super(context, attrs, defStyleAttr);

BebopVideoView is TextureView.

I think you can solve the problem by writing code like above.


Hi synman!!!
I’m mingyu from south korea and student.
Actually i have a final project with BebopDrone for my graduate what is SelfiDrone.
I saw your codes BebopVideoView & CVClassifierView file. But i don’t understand about thread.
If you don’t mind, Could you send me your wholecode of project? (i want to know procedure)

My email address is ‘’.

Thank you synman.


Hi! mastemace!
I have some problem. If you are fine, could you send me and activity_bebop.xml?

my email is

thank you