Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to slice & reverse camera view?

I am working on an app that will show reverse view from camera. For example, if current view from camera is like: enter image description here,

the app should reverse view like: enter image description here

so user will see constantly reverse view from camera through this app.

I am not very sure how to achieve this. Any help or idea would be highly appreciated. Thanks!

like image 811
Ali Avatar asked Feb 02 '11 11:02

Ali


People also ask

What is slicing in cutting?

Slicing is a general term that means to cut across the grain into thin, uniform pieces. Almost every fruit or vegetable can be sliced, as well as other ingredients like cheese and bread.


1 Answers

I understand from your answer that you want to display the reversed view in real-time.

I would create a custom SurfaceView and override the onDraw method to split the image in two and reverse the two slices.

Then I would pass the holder of your surface to the camera object like this:

camera.setPreviewDisplay(myCustomSurfaceView.getHolder());

like image 129
Trasplazio Garzuglio Avatar answered Oct 04 '22 09:10

Trasplazio Garzuglio