camera

Camera Gun

陌路散爱 提交于 2021-01-23 05:26:47
实现增强现实,打开摄像头之后,屏幕上有浮层图像(一个瞄准器图像)。 Code4App编译测试,测试环境:Xcode 4.3, iOS 5.0。 转载:http://www.adobex.com/ios/source/details/00000603.htm 来源: oschina 链接: https://my.oschina.net/u/868244/blog/105866

Three.js - Fisheye effect

回眸只為那壹抹淺笑 提交于 2021-01-20 16:20:16
问题 So, I've messed around with three.js, works out great. The only thing I can't figure out, is how to make a camera with a real fisheye effect. How is that possible? camera.setLens() ? 回答1: The fish eye effect can be achieved using Giliam de Carpentier's shader for lens distortion. Shader code: function getDistortionShaderDefinition() { return { uniforms: { "tDiffuse": { type: "t", value: null }, "strength": { type: "f", value: 0 }, "height": { type: "f", value: 1 }, "aspectRatio": { type: "f",

Three.js - Fisheye effect

会有一股神秘感。 提交于 2021-01-20 16:18:06
问题 So, I've messed around with three.js, works out great. The only thing I can't figure out, is how to make a camera with a real fisheye effect. How is that possible? camera.setLens() ? 回答1: The fish eye effect can be achieved using Giliam de Carpentier's shader for lens distortion. Shader code: function getDistortionShaderDefinition() { return { uniforms: { "tDiffuse": { type: "t", value: null }, "strength": { type: "f", value: 0 }, "height": { type: "f", value: 1 }, "aspectRatio": { type: "f",

Flutter Camera Preview in Small Widget, not in Full Screen

大城市里の小女人 提交于 2021-01-07 03:13:43
问题 Is there any way I can create a Flutter Widget, on which that widget will be an position absolute(in CSS), which inside that widget will be the Camera Preview? I have created the widget, on which I can see it on bottom right side of the screen when I access the page, but when I add the CameraPreview plugin from Flutter, it makes it full screen. What I need is an option to make it inApp preview on that bottom right widget of the page/screen that I have created. the Square widget, is where I

Flutter Camera Preview in Small Widget, not in Full Screen

て烟熏妆下的殇ゞ 提交于 2021-01-07 03:13:42
问题 Is there any way I can create a Flutter Widget, on which that widget will be an position absolute(in CSS), which inside that widget will be the Camera Preview? I have created the widget, on which I can see it on bottom right side of the screen when I access the page, but when I add the CameraPreview plugin from Flutter, it makes it full screen. What I need is an option to make it inApp preview on that bottom right widget of the page/screen that I have created. the Square widget, is where I

AVAssetWriter Unable to record audio with video | Crashing

回眸只為那壹抹淺笑 提交于 2021-01-05 08:55:53
问题 I am trying to capture video/Audio frames from CMSampleBuffer but completely failing to obtain a proper video recording. Expected Output: A Video file in .mp4 format that has both audio(from the mic) and video frames. Current Output: An Empty Directory/A video file without audio. Crashes on Run : Media type of sample buffer must match receiver's media type ("soun") I tried almost everything available online to troubleshoot this. I have a deadline coming and I just pulling my hair trying to

Camera position in orthographic projection

旧街凉风 提交于 2020-12-31 13:59:46
问题 I'm trying to understand how to use camera with usesOrthographicProjection = true . I need to set it up so when we first see the scene, the object should be viewable in full. I used the Xcode's SceneKit template, adjust a little bit about the camera (all the code is in viewDidLoad ). Using default camera (perspective projection), it looks like this: cameraNode.position = SCNVector3(x: 0, y: 0, z: ship.boundingBox.max.z + 20) Next, I tried to set the orthographic projection, now it looks like

How to mock a picture in Android Emulator Camera?

倾然丶 夕夏残阳落幕 提交于 2020-12-27 08:00:01
问题 Is there a way to set a static picture as the photo been taken by the emulator camera? I would like to test ir with zxing barcode reader on emulator. 回答1: This can be solved by adding a classic abstraction layer such as this gentleman has done in this sample source code: http://www.tomgibara.com/android/camera-source Specifically, sounds like you may want to have some test pictures and use the BitmapCamera 回答2: If you are running the emulator on linux you can create a mock webcam showing an

How to mock a picture in Android Emulator Camera?

China☆狼群 提交于 2020-12-27 07:59:26
问题 Is there a way to set a static picture as the photo been taken by the emulator camera? I would like to test ir with zxing barcode reader on emulator. 回答1: This can be solved by adding a classic abstraction layer such as this gentleman has done in this sample source code: http://www.tomgibara.com/android/camera-source Specifically, sounds like you may want to have some test pictures and use the BitmapCamera 回答2: If you are running the emulator on linux you can create a mock webcam showing an

Camera Rotation Algorithm

亡梦爱人 提交于 2020-12-16 04:54:36
问题 More a maths question then a programming one, but I need to code camera rotation and I have no idea how. The maths are a bit to abstract for me to do out of the blue. The camera's rotation is done with quaternions, all I really want is a sample to study or just an article about the subject but I can't find anything. 回答1: here is something i wrote in opengl. the basic algorithm should be the same in any language. the things you need are: the up vector of unit length (where up is defined if you