![]() ![]() Log.e(PanoramaActivity.TAG, "getFinalMosaic() returned null.") įinal int height = imageData įinal int width = imageData įinal Bitmap bitmap = Bitmap.createBitmap(width, height, _8888) Int imageData = mosaicProcessor.getFinalMosaic() If (mosaicReturnCode = Mosaic.MOSAIC_RET_CANCELLED || mosaicReturnCode = Mosaic.MOSAIC_RET_ERROR) ImagesList.add("storage/extSdCard/Test2/A3.jpg") įinal int mosaicReturnCode = createMosaicFromBitmaps(false, imagesList) ImagesList.add("storage/extSdCard/Test2/A2.jpg") ImagesList.add("storage/extSdCard/Test2/A1.jpg") Return this._mosaicer.createMosaic(true) įinal MosaicFrameProcessor mosaicProcessor = new MosaicFrameProcessor(1280, 720) Public int createMosaicFromBitmaps(final boolean highRes, final List images)įinal Bitmap bitmap = MosaicFrameProcessor.loadBitmap(file) Options.inPreferredConfig = _8888 īitmap bitmap = codeFile(filename, options) Next my method to push bitmaps instead of camera frames: JNIEXPORT jfloatArray JNICALL Java_com_android_camera_Mosaic_setSourceBitmap(JNIEnv* env, jobject thiz, jobject bitmap)Įnv->SetFloatArrayRegion(bytes, 0, 11, (jfloat*)gTRS) Īnd to generate the panorama, I do the next workflow, also based in the android source code: private static Bitmap loadBitmap(final String filename)īitmapFactory.Options options = new BitmapFactory.Options() So I've created a function to accept bitmaps based in the stock camera method: Java_com_android_camera_Mosaic_setSourceImage In my case I need to actually stitch still bitmaps and no camera frames. This code can be found in many repositories, but in any case here is the official one:įor users that are familiar with the stock android camera, the panorama option works by panning/moving the camera which automatically captures frames for later post-processing. I'm trying to create a panorama image by stitching a set of bitmaps.įor this task I'm using the source code from the android stock camera, which has a Panorama (mosaic) set of classes. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |