Post

Replies

Boosts

Views

Activity

digital zoom aka crop without scaling via setVideoZoomFactor
Hi there, i need a digital zoom aka. crop at center without the post-scaling operation. Since i am running 3 different use-cases (preview, image analyzation and image capture) it is error-prone to do the cropping in those three different locations by myself and keep them in-sync. So my idea was to use existing digital zoom api with: [_captureDevice setVideoZoomFactor:1.25]; This option seems to keep nicely the three use-cases in sync. But for my situation i can't use it that way since i need to ensure that the image is not scaled up after the crop. I was stumbling over this here: videoZoomFactorUpscaleThreshold https://developer.apple.com/documentation/avfoundation/avcapturedeviceformat/1624638-videozoomfactorupscalethreshold?language=objc No i am wondering if there is a possibility to still use setVideoZoomFactor but potentially disable the implicit scaling with something like videoZoomFactorUpscaleThreshold? Does anyone know an easy camera api to get to just crop-without scale? best, Christian
0
0
654
Dec ’22
objc vImage PixelBuffer crop
I need for an objc implementation exactly the functionality of this swift documentation: https://developer.apple.com/documentation/accelerate/vimage/pixelbuffer/3951652-cropped?changes=_7_1&language=objc It seems that there is no objc documentation present. Does anyone know how to call the crop function in objc?
2
0
739
Nov ’22
searching for reliable way to select iPhone 13 Pro macro camera device
i am developing an app using objc. I have to select the new macro camera, which is present in iPhone 13 Pro and 13 Pro Max. Currently i select my camera on all other devices with this code snipped: AVCaptureDeviceDiscoverySession *discoverySession = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:@[ AVCaptureDeviceTypeBuiltInWideAngleCamera ] mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionBack]; _captureDevice = discoverySession.devices[0]; But the documentation of the AVCaptureDeviceType does not provide any device type for the macro camera one: https://developer.apple.com/documentation/avfoundation/avcapturedevicetype?language=objc Did apple forgot to add a type for the macro camera here, or is there something missing in the documentation? Nevertheless i was able to select it with in my eyes very ugly and non stable method: _captureDevice = [AVCaptureDevice deviceWithUniqueID:@"com.apple.avfoundation.avcapturedevice.built-in_video:5"]; I determined the string ending 5 only by testing against an existing device. I am also missing here some kind of documentation or ensurance that this will still provide me the macro camera, even after an ios update ;) Does somebody know an reliable way to get the macro camera for in ios app development?
1
1
1.4k
Nov ’21
digital zoom aka crop without scaling via setVideoZoomFactor
Hi there, i need a digital zoom aka. crop at center without the post-scaling operation. Since i am running 3 different use-cases (preview, image analyzation and image capture) it is error-prone to do the cropping in those three different locations by myself and keep them in-sync. So my idea was to use existing digital zoom api with: [_captureDevice setVideoZoomFactor:1.25]; This option seems to keep nicely the three use-cases in sync. But for my situation i can't use it that way since i need to ensure that the image is not scaled up after the crop. I was stumbling over this here: videoZoomFactorUpscaleThreshold https://developer.apple.com/documentation/avfoundation/avcapturedeviceformat/1624638-videozoomfactorupscalethreshold?language=objc No i am wondering if there is a possibility to still use setVideoZoomFactor but potentially disable the implicit scaling with something like videoZoomFactorUpscaleThreshold? Does anyone know an easy camera api to get to just crop-without scale? best, Christian
Replies
0
Boosts
0
Views
654
Activity
Dec ’22
objc vImage PixelBuffer crop
I need for an objc implementation exactly the functionality of this swift documentation: https://developer.apple.com/documentation/accelerate/vimage/pixelbuffer/3951652-cropped?changes=_7_1&language=objc It seems that there is no objc documentation present. Does anyone know how to call the crop function in objc?
Replies
2
Boosts
0
Views
739
Activity
Nov ’22
searching for reliable way to select iPhone 13 Pro macro camera device
i am developing an app using objc. I have to select the new macro camera, which is present in iPhone 13 Pro and 13 Pro Max. Currently i select my camera on all other devices with this code snipped: AVCaptureDeviceDiscoverySession *discoverySession = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:@[ AVCaptureDeviceTypeBuiltInWideAngleCamera ] mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionBack]; _captureDevice = discoverySession.devices[0]; But the documentation of the AVCaptureDeviceType does not provide any device type for the macro camera one: https://developer.apple.com/documentation/avfoundation/avcapturedevicetype?language=objc Did apple forgot to add a type for the macro camera here, or is there something missing in the documentation? Nevertheless i was able to select it with in my eyes very ugly and non stable method: _captureDevice = [AVCaptureDevice deviceWithUniqueID:@"com.apple.avfoundation.avcapturedevice.built-in_video:5"]; I determined the string ending 5 only by testing against an existing device. I am also missing here some kind of documentation or ensurance that this will still provide me the macro camera, even after an ios update ;) Does somebody know an reliable way to get the macro camera for in ios app development?
Replies
1
Boosts
1
Views
1.4k
Activity
Nov ’21