Diffrent results for the image and screenshot of the image - react-native

I am using an object localizer with react native image picker to get coordinates of objects within an image. When I send the image by taking a photo with the android device the results I get are not accurate but when I take the screenshot of the photo and send it the results are almost perfect. Why might this be the case and how can I fix it?
The interesting thing is when I use the android studio emulator and send photos without taking screenshots of them the results are correct too. I have read that there are recommended image sizes for these operations however I could not find one for the object localizer.
Edit: I have found that when I take a screen shot the image resolution is equal to my devices width and height however when I take photo it uses cameras resolution.To give an example right now when I take a photo its resolution is 4032x2268 and resolution of said images screen shot is 1080x2220 which is the resolution I use for my android device.İs there any way to set cameras resolution to same as devices resolution?

Related

Need to get size of the photo that will be done before it's done. EXPO

I`m using expo-camera for doing selfie. When i do photo - i got an object with photo width, height and photo uri. Width and height always the same and specific to device.
But for some reasons ( need to show user warnings) i need to know size of the photo that will be done on my selfie camera before i do this photo.
I think i can take this data somewhere (specific to device), but can not find it.
I tried to find info in Camera.Constants but did not find anything there.
Also checked Expo Constants. No information too.
Anyone can help me?

Pull Single Frame from Video Feed (DJI Mobile SDK)

I am making a DJI Mobile SDK app and have setup an application that gets live video from the drone and displays it in a view, but I need to pull a single frame from the video feed to work with and cannot figure out how to do it!
One method would be to take a picture with the drone and then download it from the SD card, but I do not require the full resolution image and it feels like there must be a simple method to just get a single frame from the video preview.
The code which casts the video stream is:
-(void)videoFeed:(DJIVideoFeed *)videoFeed didUpdateVideoData:(NSData *)videoData {
[[DJIVideoPreviewer instance] push:(uint8_t *)videoData.bytes length:(int)videoData.length];
}
any ideas on how to pull an individual from from the feed? Or maybe is there a way to have an iOS app just take a screenshot and work with that?
Thanks!
Im not very familiar with IOS. for android there is a sample which use DJI msdk to grab the still images and use the image for Panorama stitching https://github.com/DJI-Mobile-SDK-Tutorials/Android-PanoramaDemo.
The equivalent IOS version of Panorama stitching is here. https://github.com/DJI-Mobile-SDK-Tutorials/iOS-PanoramaDemo
Maybe you can get idea on how to grab the still image from there.
There are several threads about this in android.
Ios would not be different i think.
how to get bitmap data from drone camera stream. android application
Get the bitmap from the fpvWidget is by far the simpliest and fastest solution.
public Bitmap getFrameBitmap() {
return fpvWidget.getBitmap();
}

How to get Instagram image resolution for IG media

Does anyone know how to get images with different resolution using new API Graph
https://developers.facebook.com/docs/instagram-api/reference/media
because I only able to get original resolution, and Gmetrix complains it's too big.
or maybe is there a way to resize image somehow.

Why does iPad preview use wrong image?

My question is, why does the iPad preview use a different image than the storyboard for wRegular hAny?
I'm trying to set up a universal app with a menu that will use larger buttons for iPad. In the asset catalog, I've specified the standard image size for wAny x hAny, and loaded a larger image for wRegular x hAny.
The story board looks fine for all size classes, with the wRegular x hAny using the iPad image, and everything else using the iPhone image. But the previews all use the iPhone image, including the iPad preview, despite the storyboards showing the correct images. In the screen shots below, the story board is shown to the left, preview to the right.
Can someone tell me what I'm doing wrong here? I'm trying to avoid using explicit image sizes for each class - is that what I should be doing?
Any help would be greatly appreciated. I've read everything I can on using different image sizes, and still cannot figure this out.
enter code here
You can't have a different images by size class for the same button in Interface Builder. It looks to me like you set the image of the button to be the iPad one first in Regular/Any, then set the iPhone one afterward in Any/Any which changed what you did in Regular/Any.
In this image, see how the Font has a + symbol to the left of it, but Image doesn't? That's for specifying the value per size class. Since Image doesn't have that, it's not a value saved for the specific size class.

Android DDMS screen capture, changing the size of image

When i am capturing the screen shot using DDMS, the default image dimention is 480*200. Can we change this dimention?
i want the captured image in small size (dimention).
I know i can do it later with any photo editor. but i need to take several screen shots and changing each captured image will be an extra overhead for me, so looking for some direct solution.
Thanks.
While possibly not the answer you are looking for, you could capture them all in the default size and then use a batch image resizer like Irfanview (if you are in Windows) to resize everything on one shot.