Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I apply this to live camera screen #12

Open
ghost opened this issue Aug 26, 2014 · 4 comments
Open

How can I apply this to live camera screen #12

ghost opened this issue Aug 26, 2014 · 4 comments

Comments

@ghost
Copy link

ghost commented Aug 26, 2014

I would like to kindly ask you, what is the way, to apply a filterto live camera picture ? As I know, you had showd examples where you are applying the filter on an already created picture. I would like to do the same on live picture.

Thx, K

@ragnraok
Copy link
Owner

Hi, you can use a SurfaceView to draw the camera live picture, then you can get the pixels buffer in the SurfaceView, in the class NativeFilterFunc, you can pass the pixels buffer to these native function, it return the pixels after process, in RGB format, but you need you load libAndroidImageFilter manually

@ghost
Copy link
Author

ghost commented Aug 30, 2014

Hi,
I had receivred the camera frames on onPreviewFrame function, but when Im saying: System.loadLibrary("AndroidImageFilter") I got crash, no library found. Im
just wondering why !
Cheers,K

On 29 August 2014 19:58, RagnarokStack notifications@github.com wrote:

Hi, you can use a SurfaceView to draw the camera live picture, then you
can get the pixels buffer in the SurfaceView, in the class
NativeFilterFunc
https://github.com/ragnraok/android-image-filter/blob/master/library/src/cn/Ragnarok/NativeFilterFunc.java,
you can pass the pixels buffer to these native function, it return the
pixels after process, in RGB format, but you need you load
libAndroidImageFilter manually


Reply to this email directly or view it on GitHub
#12 (comment)
.

@ragnraok
Copy link
Owner

may be you need to includes the libs I generated in your project:https://github.com/ragnraok/android-image-filter/tree/master/library/libs, but remember that the pixels pass to the functions defined in NativeFilterFunc are in RGB format, so you may need some conversion after you get the byte array of the SurfaceView

@Ahmedbutt
Copy link

I would like to do the same as kholczhauser but I dont have any experience with surface view.can you explain the whole procedure in more detail?....or can u send me sample running application which apply just one filter to live image.so that i can understand.Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants