{"id":27,"date":"2015-03-29T18:08:41","date_gmt":"2015-03-29T18:08:41","guid":{"rendered":"https:\/\/boochlin.com\/?p=27"},"modified":"2015-03-31T10:11:52","modified_gmt":"2015-03-31T10:11:52","slug":"android-camera-analyze-%e4%ba%8c-camera-2-introduction","status":"publish","type":"post","link":"https:\/\/boochlin.com\/?p=27","title":{"rendered":"Android Camera analyze (\u4e8c) &#8211; Camera 2 Introduction."},"content":{"rendered":"<p><iframe src=\"\/\/www.slideshare.net\/slideshow\/embed_code\/46416612\" width=\"600\" height=\"500\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<h4><b>Camera <\/b><b>2 Introduction<\/b><\/h4>\n<p>\u81ea\u5f9e2014 google i\/o android 5.0\u4ecb\u7d39\u65b0\u7684camera api 2 \u76f8\u4fe1\u6709\u4e0d\u5c11\u4eba\u8e8d\u8e8d\u6b32\u8a66\u9019\u65b0\u529f\u80fd<br \/>\n\u7562\u7adfdemo\u4e0a\u770b\u8d77\u4f86\u975e\u5e38\u7684\u5b8c\u6574\uff0c\u4e0d\u5c11\u65b0\u7684\u529f\u80fd\u90fd\u6709<br \/>\n\u6700\u4e3b\u8981\u6709<br \/>\n1. \u539f\u751f\u652f\u63f4 raw \u7167\u7247\u8f38\u51fa<br \/>\n2. \u5373\u6642\u62cd\u651d\u6a21\u5f0f<br \/>\n3. \u63d0\u9ad8\u9023\u62cd\u901f\u5ea6\uff0c\u904e\u53bb\u7684\u67b6\u69cb\u5e38\u5e38\u58d3\u5236\u5728\u8edf\u9ad4\u7684\u8a2d\u8a08\uff0c\u9019\u6b21\u7b97\u662f\u5927\u4fee\u6b63\uff0c\u9023\u62cd\u53ef\u4ee5\u9054\u5230\u975e\u5e38\u9ad8\u3002<br \/>\n4. \u589e\u52a0\u53ef\u4ee5\u63a7\u5236\u7684\u8981\u4ef6\u3002<\/p>\n<p>\u4e0d\u904e\u8001\u5be6\u8aaa\u5230\u76ee\u524d2015\u5e74\u521d\uff0c\u6709\u652f\u63f4\u5230\u90a3\u67d0\u591a\u7684\u8981\u7d20\u63a7\u5236\u6839\u672c\u6c92\u5e7e\u96bb\u624b\u6a5f\u963f<\/p>\n<p><!--more--><\/p>\n<h4>page2:<\/h4>\n<p style=\"padding-left: 30px;\">Camera API History<br \/>\n\u5f9e Camera 1 \u5b9a\u6848\u4e4b\u5f8c\uff0c\u57fa\u672c\u4e0a\u90fd\u6c92\u6709\u6539\u904e<br \/>\nAPI 14: \u81c9\u90e8\u5075\u6e2c<br \/>\nAPI 15: Video stabilization (\u9019\u5f88\u96e3\u89e3\u91cb\u963f)<br \/>\nAPI 16: \u79fb\u52d5\u4e2d\u81ea\u52d5\u5c0d\u7126<br \/>\nAPI 17: \u95dc\u9589 Shutter sound\u3002<br \/>\nAPI 20: Camera 2 \u555f\u7528<br \/>\n\u770b\u5f97\u51fa\u4f86\u5927\u90e8\u5206\u90fd\u662f\u5c0f\u6539\u52d5<br \/>\n\u800c\u9019\u6b21\u7684\u91cd\u9ede\u5c31\u662f \u5927\u6539\u4e2d\u7684\u5927\u6539 Camera2 api.<\/p>\n<h4>page3:<\/h4>\n<p style=\"padding-left: 30px;\">\u5f88\u660e\u986f\u7684google \u60f3\u8981\u6368\u68c4\u539f\u672c\u7684camera api<br \/>\n\u7562\u7adf &#8220;\u4e0d\u7136\u6211\u505a\u9019\u6295\u5f71\u7247\u5e79\u561b\u5566&#8221;\uff0c\u539f\u672c\u7684camera1 \u5c31\u50cf\u662f\u50bb\u74dc\u76f8\u6a5f\u4e00\u6a23<br \/>\n\u5e7e\u4e4e\u5168\u90e8\u8a2d\u5b9a\u90fd\u5beb\u597d\uff0c\u6c92\u5565\u53ef\u4ee5\u6539\u52d5<br \/>\n\u800c\u65b0\u7684 camera 2 \u5c31\u50cf\u662f\u55ae\u773c\u76f8\u6a5f\uff0c\u5e7e\u4e4e\u6240\u6709\u7684\u9078\u9805\u8a2d\u5b9a\u90fd\u53ef\u4ee5\u81ea\u5df1\u63a7\u5236<\/p>\n<h4>page4:<\/h4>\n<p style=\"padding-left: 30px;\">\u7a76\u7adfcamera1 \u5230\u5e95\u6709\u5565\u4ee4\u4eba\u4e0d\u5feb\u7684\u5730\u65b9\uff0c\u4e0d\u5c11\u958b\u767c\u8005\u61c9\u8a72\u76f4\u63a5\u60f3\u5230<br \/>\n1. \u5e7e\u4e4e\u53ea\u6709\u5e7e\u500b\u9ed1\u7bb1\u529f\u80fd\u80fd\u7528\uff0c\u53ef\u4ee5\u8b93\u958b\u767c\u8005\u73a9\u5f97\u5be6\u5728\u592a\u5c11<br \/>\n&#8211; preview , still capture , video record.<\/p>\n<p style=\"padding-left: 30px;\">2. burst mode \u6839\u672c\u505a\u4e0d\u51fa\u4f86\u963f\uff0c\u5982\u679c\u6c92\u6709vendor\u53bb\u914d\u5408\uff0c\u7b2c\u4e09\u65b9\u592a\u56f0\u96e3\u4e86<br \/>\n\u53ea\u9760camera1 api \u6709\u4e9b\u5be6\u5728\u7121\u7406&#8230;ex:<br \/>\n&#8211; zero shutter lag , multi shot HDR , Panoramic stitch.<\/p>\n<p style=\"padding-left: 30px;\">3. \u80fd\u63d0\u4f9b\u7684\u8cc7\u8a0a\u5be6\u5728\u592a\u5c11\uff0c\u9019\u6703\u4f7f\u5f97\u5f8c\u88fd\u4e0d\u597d\u73a9<\/p>\n<p style=\"padding-left: 30px;\">4. \u786c\u9ad4\u53cd\u61c9\u592a\u6162\u7684\u8a71\uff0c\u5f88\u591aeffect \u7684\u63a7\u5236\u6703\u5f88\u96e3\u4fdd\u8b49<\/p>\n<h4>page5:<\/h4>\n<p style=\"padding-left: 30px;\">Camera1 \u7684\u67b6\u69cb(\u8acb\u770b\u524d\u4e00\u9801\u7684\u5716\u793a)\u53ea\u80fd\u8b93\u9023\u62cd8mp\u7167\u7247\u6642\uff0c\u7dad\u6301\u57281-3fps<br \/>\n\u5149\u770b\u9019\u6a23\u5c31\u77e5\u9053\u6839\u672c\u77e5\u9053 HDR \u4e0d\u53ef\u80fd\u5566<\/p>\n<h4>page6:<\/h4>\n<p style=\"padding-left: 30px;\">Camera 2 \u4e09\u53e5\u4ee5\u853d\u4e4b<br \/>\nMore manual control , pipeline model. More feedback<br \/>\n\u5c31\u662f\u8b8a\u5f97\u8d85\u5feb\uff0c\u53ef\u4ee5\u73a9\u7684\u9078\u9805\u4e5f\u8b8a\u591a\uff0c\u4ee5\u53ca\u66f4\u591a\u7167\u7247\u8a0a\u606f<\/p>\n<h4>page7:<\/h4>\n<p style=\"padding-left: 30px;\">\u8b93\u9023\u62cd8mp\u7167\u7247\u6642\uff0c\u7dad\u6301\u572830fps&#8212;&#8212;&#8212;&#8212;<br \/>\n<del datetime=\"2015-03-29T14:37:04+00:00\">\u5feb\u80fd\u641e\u5b9a\u4e00\u5207<\/del><\/p>\n<h4>page8:<\/h4>\n<p style=\"padding-left: 30px;\">\u8b93\u9023\u62cd8mp\u7167\u7247\u6642\uff0c\u7dad\u6301\u572830fps\uff0c\u52a0\u4e0a\u5404\u7a2e\u8b8a\u5316&#8212;\u5716\u70ba\u66dd\u5149\u8b8a\u5316<br \/>\n\u9019\u5f88\u660e\u986fHDR\u6709\u641e\u982d\u4e86<\/p>\n<h4>page9:<\/h4>\n<p style=\"padding-left: 30px;\">Camera2 \u7684\u57fa\u790e\u67b6\u69cb\uff0c\u53ef\u4ee5\u770b\u5f97\u51fa\u4f86\u8ddfcamera1 \u7684\u7528\u6cd5\u6709\u8b8a<br \/>\n\u4e3b\u8981\u6709:<br \/>\n1. Camera\u7684service\u6539\u70ba\u5f9e system \u53d6\u5f97<\/p>\n<p style=\"padding-left: 30px;\">2. \u6839\u64dasystem\u63d0\u4f9b\u7684CameraCharacteristics \u53bb\u958b\u555f CameraDevice<\/p>\n<p style=\"padding-left: 30px;\">3. \u4e0d\u5728\u9396\u5b9a\u5e7e\u7a2ecamera \u4f7f\u7528\u65b9\u6cd5(capture,startPreview)\uff0c\u800c\u662f\u53ef\u4ee5\u5206\u96e2\u51fa<br \/>\n\u4e0d\u540c\u7684\u9700\u6c42(CaptureRequest)\u4f5c\u8b8a\u5316<\/p>\n<p style=\"padding-left: 30px;\">4. \u5c0d\u65bccamera\u7684\u4f7f\u7528\u751f\u547d\u5468\u671f\u4e5f\u662f\u9396\u5b9a\u5728 CameraCaptureSession<\/p>\n<p style=\"padding-left: 30px;\">5. \u5728\u8f38\u51fa\u65b9\u9762\u4e5f\u4e0d\u5411camera1\u6307\u5b9a\u5728\u67d0\u500b\u55ae\u4e00surface\uff0c\u800c\u662f\u591a\u500b<br \/>\n\u9019\u6a23\u53ef\u4ee5\u8b93\u5f8c\u88fd\u8b8a\u5f97\u66f4\u52a0\u8da3\u5473\u3002<\/p>\n<h4>page10:<\/h4>\n<p style=\"padding-left: 30px;\">\u9019\u662f\u4e0a\u8ff0pipeline\u7684\u7c21\u6613\u5716\u793a<br \/>\n1. \u53ef\u4ee5\u5728captureRequest\u6307\u5b9aoutput surface.\u4e26\u6392\u5e8f\u9032\u5165 request queue.<\/p>\n<p style=\"padding-left: 30px;\">2. \u8655\u7406\u5b8c\u6210\u7684request\u5728captureSession\u4e2d\u5b8c\u6210\u5f8c<br \/>\n\u53ef\u4ee5\u76f4\u63a5\u5c0d\u61c9\u5230\u500b\u5225surface\uff0cpush result and view.<\/p>\n<h4>page11:<\/h4>\n<p style=\"padding-left: 30px;\">\u9019\u5b8c\u5168\u53ef\u4ee5\u770b\u51fa camera2 \u53ef\u4ee5\u73a9\u7684\u9805\u76ee\u8b8a\u5f97\u8d85\u591a<br \/>\n1. \u5404\u7a2emanual control , auto-mode control\u3002<\/p>\n<p style=\"padding-left: 30px;\">2. \u5b8c\u6210\u5f8c\u7684\u8655\u7406class\u4e5f\u8b8a\u591a\uff0c\u5370\u8c61\u4e2dcamera1 \u53ea\u6709\u5169\u7a2e\u3002<\/p>\n<p style=\"padding-left: 30px;\">3. output format\u6700\u5927\u6539\u8b8a\u5c31\u662f RAW_SENSOR\u7684\u652f\u63f4\u3002<\/p>\n<h4>page12:<\/h4>\n<p style=\"padding-left: 30px;\">\u5448\u4e0a<br \/>\n4. CameraCharacteristics \u7684\u8cc7\u8a0a\u8b8a\u8d85\u591a\u3002<\/p>\n<p style=\"padding-left: 30px;\">5. Camera1 \u7684\u592a\u5c11result\u8cc7\u8a0a\uff0c\u4e5f\u81f3\u5c11\u8b8a\u6210\u4e09\u500d\u3002<\/p>\n<h4>page13:<\/h4>\n<p style=\"padding-left: 30px;\">\u5176\u5be6\u5c31\u662f\u91cd\u8907\u524d\u5e7e\u9801\u7684\u8cc7\u6599<br \/>\n\u8a18\u4f4f:<br \/>\n1 Request -&gt; 1 image captured -&gt; 1 result metadata + N image buffers.<\/p>\n<p>\u4ee5\u4e0a\u662fcamera2 \u53ef\u4ee5\u505a\u7684\u4e8b\u60c5\uff0c\u5f15\u8d77\u958b\u767c\u7684\u53ef\u80fd\u6027<br \/>\n\u4e0b\u4e00\u7ae0\u7bc0\u70ba \u6559\u5927\u5bb6 \u5229\u7528\u65b0\u7684camera2\u53bb\u958b\u767c\u65b0\u7684camera<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Camera 2 Introduction \u81ea\u5f9e2014 google i\/o android 5.0\u4ecb\u7d39\u65b0\u7684camera api 2 \u76f8\u4fe1\u6709\u4e0d\u5c11\u4eba\u8e8d\u8e8d\u6b32\u8a66\u9019\u65b0\u529f\u80fd \u7562\u7adfdemo\u4e0a\u770b\u8d77\u4f86\u975e\u5e38\u7684\u5b8c\u6574\uff0c\u4e0d&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[4],"_links":{"self":[{"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/posts\/27"}],"collection":[{"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/boochlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=27"}],"version-history":[{"count":1,"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/posts\/27\/revisions"}],"predecessor-version":[{"id":31,"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/posts\/27\/revisions\/31"}],"wp:attachment":[{"href":"https:\/\/boochlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=27"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/boochlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=27"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/boochlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=27"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}