CWAC - Pink Camera Previews in bright screne - android

I was including CWAC-Android Library in my Project, at first, thanks a lot for doing this work.
But I experience some really strange problem.
Pictures in light scene (area, outside, bright light, beautiful day, sunlight), and images get some pink overlay,
on fast checking it i was not able to find a solution or a reason for that,
it seems it's just some overlay and not really "the image",
it tried it in my implementation,
and the library demo project, it exists in both .. :/
im doing it on a xperia Z1? maybe another problem?
any assistance would be great?
Some sample images
http://s1.directupload.net/images/140227/463xystc.jpg
http://s7.directupload.net/images/140227/l78xvjhd.jpg
sorry my mouth is always open on images :D ;) thanks
Pictures taken with sample (demo) project
Problem seems to occur when directly moving camera to bright "scene" and taking picture immediately, like this small amount of time when the camera screen is just overexposed

finally I didn't find any solution of the problem within the library to fix by myself,
did the implementation on my own (basic one) -> works just fine.
using following fix for distortions (portrait and lanscape):
https://stackoverflow.com/a/22201580/371749
good luck

Related

AndEngine game show black screen before loading

I have developed the Game in AndEngine but it shows black screen for some time before loading.I have so many research but till now I did not found proper answers to remove black screen.Please help me how to resolve this.
it is very difficult for me. please take seriously and help me
The black screen appears after the app is started and stays there until the required graphics resources for the game are loaded into memory. If the black screen annoys you, there are two options I know of:
You can try to make your loading sequence shorter by making your
code as efficient as possible. You can look at tips for this
here.
Another possibility is to have what is called a splash
screen. See this tutorial for how to this in AndEngine.

Getting Face From The Picture

Here is what i have done till now.
I have launched the camera from my application
I have taken a photo
I have used the face detection technique to paint a square green window in the face region
Now I am wondering, how will i extract the exact face using face detection?
I have gone through a number of questions over stack overflow related to this problem, unfortunately, the solutions are not accurate enough.
I mean, I have seen solutions like performing cropping based on circular window, but I somehow need to get the exact face extracted from the image. Is it possible? How? Whats the best possible solution available to do this? Any code snippets would be appreciated.

How to set camera resolution in Android with OpenCV?

I'm trying to develop an app for Android, and I would need to get uncompressed pictures with a resolution as high as possible from the camera. I tried takePicture's rawCallback and postviewCallback, but they are not working.
Right now I'm trying with OpenCV (version 2.4) using VideoCapture, but I'm stuck in the default 960x720, which is poor for what I need; and my phone, a Samsung Galaxy S3, is able to provide, theoretically, up to 8Mpx (3,264×2,448 for pictures, and 1,920×1,080 for video, according to Wikipedia). VideoCapture.set(Highgui.CV_CAP_PROP_FRAME_WIDTH/HEIGHT, some number) makes the camera return a black image as far as I've found.
Is there any way to obtain a higher resolution, either through OpenCV or with the Android API, without compressing?
I'm really sorry if this has been asked before; I have been looking for days and I have found nothing.
Thank you for your time!
EDIT: Although it is not exactly what I was asking, I found that there is a way to do something very similar: if you set an OnPreviewCallback for the Camera, using setPreviewCallback, you do get the raw picture data from the camera (at least in the S3 I'm working with). I leave it here in case somebody finds it useful in the future.
EDIT: A partial solution is explained in an answer below. To sum up,
vc.set(Highgui.CV_CAP_PROP_FRAME_WIDTH, desiredFrameWidth);
vc.set(Highgui.CV_CAP_PROP_FRAME_HEIGHT, desiredFrameHeight);
works under some conditions; please see below for further detail.
You have to get supported camera preview resoultions by calling getSupportedPreviewSizes.
After this you can set any resolution with method setPreviewSize. And don't forget to setParameters in the end. Actally many OpenCV Android examples contain this information (look at sample3).
In case anybody ever finds this useful, I found a (partial) solution: If your VideoCapture variable is called vc, this should work:
vc.set(Highgui.CV_CAP_PROP_FRAME_WIDTH, desiredFrameWidth);
vc.set(Highgui.CV_CAP_PROP_FRAME_HEIGHT, desiredFrameHeight);
Mind that the combination of width and height must be one of the supported picture formats for your camera, otherwise it will just get a black image. You can get those through Camera.Parameters.getSupportedPictureSizes().
However, setting a high resolution appears to exceed the YUV conversion buffer's capacity, so I'm still struggling with that. I'm going to make a new separate question for that, to keep everything clearer: new thread
setPreviewSize does not set picture resolution. setPictureSize does.

Frames get from front camera of Android are stretch to the screen

I'm new in Android programming. I've already program an application that makes the phone which has front camera likes a mirror. I use front camera to do that, but a problem is that when I look at myself via the screen, my head is stretched (it means my head is lengthen) and it looks so funny. Could anyone help me fix this, I appreciate that.
Thanks in advance

OpenGL model Overlay of Camera Preview

I am trying to display a .md2 model over top of the camera preview on my android phone. I don't need to use the accelerometers or anything. If anyone could even just point me in the right direction as to have to set up an opengl overlay that would be fantastic. If you are able to provide code that shows how to enable this that would be even better! It would be greatly appreciated..
I'm not able to provide code until later this week, but you might want to check out a library called min3d, because I believe they already have a parser written for .md2 files. Then I believe that if you use a GLSurfaceView, the background can be set to be transparent, and you can put a view of the camera behind it. Are you trying to get some kind of augmented reality effect? There are android specific libraries for that too, but they're pretty laggy (at least on my Motorola Droid).

Categories

Resources