I am working on camera based application.
I want to normalize image that is captured by device's camera.
Is it possible to normalize image in android? any idea how can i do that?
Thanks...
Try to use Catalano Framework. Here contains the article that you can learn how to use.
I implemented Image Normalization using this approach.
FastBitmap fb = new FastBitmap("image.jpg");
fb.toGrayscale();
ImageNormalization in = new ImageNormalization();
in.applyInPlace(fb);
Related
I am using following image in VrPanoramaView
When i load it in the view, it looks like this.
But i want it to move the image to left side dynamically before opening the image, like this.
I can move the image with finger, but i want it to set its angle at the loading time.
This is my code.
VrPanoramaView.Options options = new VrPanoramaView.Options();
InputStream inputStream = null;
AssetManager assetManager = getAssets();
inputStream = assetManager.open("test_2"+ ".jpg");
options.inputType = VrPanoramaView.Options.TYPE_MONO;
mVrPanoramaView.loadImageFromBitmap(BitmapFactory.decodeStream(inputStream), options);
mVrPanoramaView.setStereoModeButtonEnabled(false);
mVrPanoramaView.setInfoButtonEnabled(false);
mVrPanoramaView.setPureTouchTracking(true);
mVrPanoramaView.setFullscreenButtonEnabled(true);
I tried mVrPanoramaView.setPivotX(100);, but it does not make any impact. I need to know how to translate image in panorama view with using any hand gesture.
I am using GoogleVrSDK
implementation 'com.google.vr:sdk-base:1.160.0'
implementation 'com.google.vr:sdk-panowidget:1.170.0'
I think, you should switch to Video360:
There are more signs this component is not under development any more.
Set initial angle of VrPanoramaView
There are no plans to add more functionality to the VrView widgets.
But you more complex controls for a 360 media player, consider using
the Video360 sample as a starting point. See #510 for more info.
VR View for Android
Warning: These components were removed in v1.190 of the GVR SDK for
Android. The Video360 sample should be used as a basis for creating
360 photo and video viewers. If you still want to use these widgets,
you will need to use SDK v1.180 or earlier.
I am getting Barcode(com.google.android.gms.vision.barcode) object from a physical sales card via camera. Is there a way to convert it back to a image using gms:play-services-vision library?
I think you will get barcode value in a string. you may try to below code
TextView tv = (TextView)findViewById(R.id.textview);
tv.setText(bitmapstring);
tv.buildDrawingCache();
ImageView img = (ImageView)findViewById(R.id.imageview);
img.setImageBitmap(tv.getDrawingCache());
Seems like there's no way of doing that by using the play-services-vision library. My first thought would be to take a screen capture of the preview of the camera before actually reading the barcode, but let's suppose you cannot do that.
If you have the actual data and the format of the barcode you can use ZXing to generate back the barcode image.
Here's an example of how to do it: Generate barcode image in Android application
Currently I'm working on a android program using Mobile Vision. I am using the "TextRecognizer" class and one of the methods is .detect(Frame frame). Right now I have a image I want to input into it, however, the image is the file type "Bitmap". I have tried to convert it to "Frame" by casting it but that hasn't worked. If anyone has any suggesting it would be much appreciated.
Use the setBitmap method in the Frame.Builder class:
Frame outputFrame = new Frame.Builder().setBitmap(myBitmap).build();
I've been created an app on android and I'm using the com.android.camera.action.CROP intent to crop picture (the user can select the crop area).
I'm searching an easy way to do the same with objective-c as android could. I found some solution but it's only to crop with fixed parameter.
Do you have idea (github link, blog link...)?
Thanks in advance
if you want to use the third party libraries than here are the link,
pecropViewController
RSKImageCropper
or if you want to use inbuilt cropper of ios than when you create imagepicker controller object set it's property like this
UIImagePickerController *picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.allowsEditing = YES;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
[self presentViewController:picker animated:YES completion:NULL];
here picker.allowsEditing is the property which allow to crop image in square.
Hope, this will help you
There are so many good example available for crop image with Objective-C.
Please check few examples list as below.
PEPhotoCropEditor
TOCropViewController
BABCropperView
PhotoTweaks
MDImageCroper
InstagramPhotoPicker
RSKImageCropper
CropperView
VPImageCropper
PerfectImageCropper
I've been trying to figure out how to display a photo on Android. I can create an ImageView and display a picture, but the functionality is limited (no zoom, pan or share). Is there a demo or tutorial with code out there on how to do this? I've been searching all week with no luck.
Thanks.
P.S.> Please No Snark!
Maybe I don't understand how to create a uri correctly or how to make my resource available to the viewer. I have a resource ID, R.drawable.opal, I'm using to display different minerals and gems for a science project. If the student clicks the small sample photo, then I want to bring up a bigger and better viewer for the photo to allow them to compare to their collected rock.
Unless you really need to build your own you should probably just use the gallery's viewer. Send it the picture by using the view intent like so:
Intent viewImageIntent = new Intent(android.content.Intent.ACTION_VIEW, uri);
startActivity(viewImageIntent);
Replace "uri" with the image's uri of course. Writing your own viewer is really involved and would include threading, physics calculations and handling touch inputs.