camera-overlay

Display a rectangular bounding box (overlay) on custom Camera2 API so only the image inside the box is captured

ε祈祈猫儿з 提交于 2021-02-10 06:30:34
问题 I'm using the following code to capture an image using the custom Camera2 API. I am a beginner and I have no idea how to display a rectangular overlay on the camera preview. I did try the solutions available here, but I can't figure out how to fit it in my code. I need to achieve something like this to capture A4 sheets. Only the part of the image which is in the box must be captured and displayed in the next activity. MainActivity package com.example.customcamera; import android.Manifest;

Display a rectangular bounding box (overlay) on custom Camera2 API so only the image inside the box is captured

流过昼夜 提交于 2021-02-10 06:30:22
问题 I'm using the following code to capture an image using the custom Camera2 API. I am a beginner and I have no idea how to display a rectangular overlay on the camera preview. I did try the solutions available here, but I can't figure out how to fit it in my code. I need to achieve something like this to capture A4 sheets. Only the part of the image which is in the box must be captured and displayed in the next activity. MainActivity package com.example.customcamera; import android.Manifest;

UIImagePickerController custom FlashMode button is not working on IOS 10 (swift)

前提是你 提交于 2020-01-15 09:21:05
问题 I know that a question of this type is already asked but I Debugged it in bit detail, and i came to this point that when i switched this flag off self.picker.showsCameraControls = false then the custom flash button doesn't respond but if I'll change the flag to self.picker.showsCameraControls = true then my custom flash button responding OK, I have check all the delegates and flags but I am not able to pin point the bug, either it is in my code or it is in IOS 10 version, if its in my code

Adding objects over camera view in app (Swift 3) not under camera view?

那年仲夏 提交于 2020-01-14 05:33:11
问题 I have an overlay over the camera view made up of red circles, stored in the Assets.xcasset ImgOverlay placeholders, and the cameraview (preview) appears behind - or underneath - the overlay. That's fine. As it should be. When I run the app on the iPhone, the overlay appears as it should. See Img.1 But I also have a blue circle being drawn, that is Underneath the Camera View, and only appears if the camera view is missing. That is, Turned off, or run on a simulator. See Img.2 below. Image 1.

AVCaptureSession VS UIImagePickerController camera preview

大城市里の小女人 提交于 2019-12-23 18:04:09
问题 I'm developing an application similar to Instagram iOS app. Instagram have a custom camera preview. I want to develop something similar and the question is - what to use better for this purpose - UIImagePickerController with custom cameraOverlayView property or should I use AVCaptureSession ? Maybe someone have such experience and can give me an advice. Will be appreciate. 回答1: AVCaptureSession is more customisable than UIImagePickerController. In case of speed, there is not much difference.

Using cameraOverlayView with UIImagePickerController

99封情书 提交于 2019-12-18 13:13:18
问题 I know this has been asked a number of time but I can't find an answer. I have an app that uses the UIImagePickerController to take a picture. The problem is that I only want the camera option to be available and I understand that I need to hide the standard controls: cameraUI.showsCameraControls=NO; and use a cameraOverlayView to provide my own controls. I have had a look at Apple's PhotoPicker project already and my initial problem is how do I get an Overlay object onto my storyboard? I can

Swift: how to prevent UIImagePicker method takePicture() from calling didFinishPickingMediaWithInfo

亡梦爱人 提交于 2019-12-11 10:22:41
问题 I am developing a customized overlay from my `UIImagePicker func prepareImagePicker() -> CustomOverlayView { self.imagePicker = UIImagePickerController() self.imagePicker.delegate = self self.imagePicker.sourceType = .Camera self.imagePicker.cameraCaptureMode = .Photo self.imagePicker.showsCameraControls = false self.imagePicker.modalPresentationStyle = .FullScreen //customView stuff let customViewController = CustomOverlayViewController( nibName:"CustomOverlayViewController", bundle: nil )

UIImagePickerController with cameraOverlayView focusses when button in overlay is tapped

烈酒焚心 提交于 2019-12-10 21:15:17
问题 I'm new to Objective C and it's my first question I'm posting here so this is probably the easiest question in the world to answer, but I couldn't figure this one out. I am trying to create an iOS app that uses the camera. I'm using the UIImagePickerController class to display the camera and take pictures, but I've created a custom UIView that contains a bunch of UIButton instances which overlay the camera preview frame, using the cameraOverlayView property. I'm using the a method to put the

Combining Images in CameraView with Overlay. (Swift 3)?

旧时模样 提交于 2019-12-09 23:43:43
问题 I just about have this solved. Thanks to some brilliant help getting me on the right track. This is the code I have now. Basically, I can now make an image out of the drawn overlay, and the cameraPreview. But can't yet combine them. There seems very little useful code that I can find that does this simply. So the important part is the extension block right at the top, and the additions to the func saveToCamera() near the bottom of the code. In short, I now have the two images I need, I think.

Exlusive touch in cameraoverlay view (of the camerapicker) in iOS?

筅森魡賤 提交于 2019-12-07 19:32:51
问题 In my application, I added a cameraOverlayView to the camerapicker. It contains three subviews, two UIButtons and one UIImageView . The image is draggable. The buttons are used to change the image to another one. When I touch a button, or the image, the tap-to-focus rect of the camera will always be displayed beneath (and the actual focus will change). Setting exclusiveTouch to YES on all three subviews doesn't change the behaviour. Any idea, how i can stop the camerapicker from getting the