{"id":1458,"date":"2013-04-21T19:55:39","date_gmt":"2013-04-21T11:55:39","guid":{"rendered":"https:\/\/blog.rexdf.org\/?p=1458"},"modified":"2013-04-22T16:33:12","modified_gmt":"2013-04-22T08:33:12","slug":"lfp%e6%96%87%e4%bb%b6%e6%a0%bc%e5%bc%8f%e8%a7%a3%e6%9e%90","status":"publish","type":"post","link":"https:\/\/blog.rexdf.org\/en\/2013\/04\/lfp%e6%96%87%e4%bb%b6%e6%a0%bc%e5%bc%8f%e8%a7%a3%e6%9e%90\/","title":{"rendered":"LFP format"},"content":{"rendered":"<p>\u7ecf\u8fc7\u4e00\u756a\u6298\u817e\uff0c\u5728\u6211\u768464\u4f4dWin8\u4e0a\u9762\u4e5f\u88c5\u4e0a\u4e86GSTreamer\u7684Python\u7ed1\u5b9a\uff0c\u7136\u540e\u5c31\u5f00\u59cb\u73a9behnam-python-lfp-reader\uff0c\u4e4b\u540e\u7ecf\u8fc7\u641c\u7d22\uff0c\u53d1\u73b0\u4e86\u4e00\u4e2a\u6807\u51c6C\u8bed\u8a00\u7248\u672c\u7684\uff0c\u548c\u4e00\u4e2a\u7528php\u7c7b\u5199\u7684\u7248\u672c\u3002<\/p>\n<h1>1.lfptools<\/h1>\n<p>\u5f53\u7136\u5148clone\u4e0b\u6765<\/p>\n<pre class=\"brush: bash; gutter: true\">git clone\u00a0git:\/\/github.com\/nrpatel\/lfptools.git<\/pre>\n<p>\u7136\u540e\u8fdb\u5165MingW<\/p>\n<pre class=\"brush: bash; gutter: true\">cd \/e\/work\/lfptools\/\r\nmake<\/pre>\n<p>\u6210\u529f\u7f16\u8bd1<br \/>\n<a href=\"https:\/\/blog.rexdf.org\/wp-content\/uploads\/2013\/04\/lfptools.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1459 ls_lazyimg\" alt=\"lfptools\" src=\"https:\/\/static.rexdf.org\/plugins\/images-lazyload-and-slideshow\/blank_1x1.gif\" file=\"https:\/\/blog.rexdf.org\/wp-content\/uploads\/2013\/04\/lfptools.png\" width=\"621\" height=\"405\" \/><noscript><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1459\" alt=\"lfptools\" src=\"https:\/\/blog.rexdf.org\/wp-content\/uploads\/2013\/04\/lfptools.png\" width=\"621\" height=\"405\" srcset=\"https:\/\/static.rexdf.org\/uploads\/2013\/04\/lfptools.png 621w, https:\/\/static.rexdf.org\/uploads\/2013\/04\/lfptools-300x195.png 300w\" sizes=\"auto, (max-width: 621px) 100vw, 621px\" \/><\/noscript><\/a><\/p>\n<p>\u73b0\u5728\u5c31\u5206\u6790\u4e0b\u6e90\u4ee3\u7801\u4e86<br \/>\nmain\u51fd\u6570\u8fdb\u5165\u4e4b\u540e\u89e3\u6790\u547d\u4ee4\u884c\u7b2c\u4e00\u4e2a\u53c2\u6570\uff0c\u5e76\u8c03\u7528lfp_create\u6253\u5f00\uff0c\u8fc7\u7a0b\u5927\u7ea6\u5c31\u662f\uff0c\u7b97\u51fa\u6587\u4ef6\u957f\u5ea6\u5e76\u586b\u5165\u8868\u4e2d(\u4e8c\u8fdb\u5236\u5230\u4f4d\u4e2d\u95f4\u8f6c\u6362\u8fc7\u4e00\u6b21)\uff0c\u7136\u540e\u6574\u4e2a\u6309\u7167\u4e8c\u8fdb\u5236\u6587\u4ef6\u8bfb\u53d6\u51fa\u6765\u3002<\/p>\n<p>\u63a5\u7740\u4fbf\u662f\u8c03\u7528lfp_file_check\u68c0\u6d4b\u662f\u5426\u662flfp\u683c\u5f0f\u7684\u6587\u4ef6\uff0clfp\u683c\u5f0f\u6587\u4ef6\u5f00\u5934\u6807\u5fd7\u4e3a0x89, 0x4C, 0x46, 0x50, 0x0D, 0x0A, 0x1A, 0x0A\u3002<\/p>\n<p>\u4e0b\u4e00\u6b65\u5c31\u662f\u89e3\u6790lfp\u6587\u4ef6\u4e86\uff0clfp\u6570\u636e\u662f\u4e00\u5757\u4e00\u5757\u7684\uff0c\u6bcf\u5757\u90fd\u6709\u4e00\u4e2a\u9b54\u672f\u59343+1byte\uff0c\u7136\u540e\u5c31\u662f\u5757\u7684\u957f\u5ea6\uff0c\u8fd9\u662f\u4e00\u4e2a32bit\u7684\u6574\u6570\uff0c\u800c\u4e14\u5927\u7aef\u65b9\u5f0f\uff0c\u8f6c\u6362\u6210\u6b63\u5e38\u6574\u6570\u5373\u662f\u6570\u636e\u5757\u957f\u5ea6\uff0c\u4e4b\u540e\u5c31\u662f45bit SHA1+35bit Blank,\u63a5\u4e0b\u53bb\u5c31\u662f\u58f0\u660e\u957f\u5ea6\u7684\u5757\u6570\u636e\u4e86\u3002\u6570\u636e\u5757\u8bc6\u522b\u597d\u4ee5\u540e\u5c31\u662f\u8bc6\u522b\u6570\u636e\u5757\u7684\u7c7b\u578b\uff0c\u9996\u5148\u5bfb\u627e\u4e00\u4e2a\u201c\u201d\u5305\u542b\u7684\u5b57\u7b26\u4e32\uff0c\u4ece\u5904\u7406\u4e0a\u770b\uff0c\u5e94\u8be5\u5305\u62ec\u4ee5\u4e0b\u51e0\u79cd\u7c7b\u578b\uff1a<\/p>\n<p>LFP_RAW_IMAGE\u5e94\u8be5\u5c31\u662f\u666e\u901a\u7684\u56fe\u7247\u683c\u5f0f\u4e86\uff0c\u8c03\u7528converted_image\u51fd\u6570\u5904\u7406\uff0c\u4f3c\u4e4e\u5c31\u662f\u628a3*8bit\u7684\u6570\u636e\u8f6c\u6362\u6210\u5982\u4e0b\u7684\u4e24\u4e2a16\u4f4d\u6570\u636e\u3002<br \/>\n<a href=\"https:\/\/blog.rexdf.org\/wp-content\/uploads\/2013\/04\/image1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/static.rexdf.org\/plugins\/images-lazyload-and-slideshow\/blank_1x1.gif\" file=\"https:\/\/blog.rexdf.org\/wp-content\/uploads\/2013\/04\/image1.png\" alt=\"image\" width=\"478\" height=\"283\" class=\"alignnone size-full wp-image-1465 ls_lazyimg\" \/><noscript><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/blog.rexdf.org\/wp-content\/uploads\/2013\/04\/image1.png\" alt=\"image\" width=\"478\" height=\"283\" class=\"alignnone size-full wp-image-1465\" srcset=\"https:\/\/static.rexdf.org\/uploads\/2013\/04\/image1.png 478w, https:\/\/static.rexdf.org\/uploads\/2013\/04\/image1-300x177.png 300w\" sizes=\"auto, (max-width: 478px) 100vw, 478px\" \/><\/noscript><\/a><br \/>\nLFP_JSON \u6570\u636e\u540d\u5b57,\u5047\u8bbe\u5176\u4ed6\u4e0d\u662f&#8221;imageRef&#8221;\u6807\u8bc6\u7684<br \/>\nLFP_DEPTH_LUT \u6df1\u5ea6\u4fe1\u606f\uff0c\u662f4*8bit\u4e00\u4e2a32\u4f4d\u7684float\u683c\u5f0f\u3002\u7528&#8221;depth&#8221;\uff08\u5305\u62ec\u5f15\u53f7)\u6807\u8bc6<br \/>\nLFP_LUT \u662fLytro\u7b2c\u4e8c\u7248\u672c\u6709\u7684\uff0c\u7528&#8221;lut&#8221;\uff08\u5305\u62ec\u5f15\u53f7)\u6807\u8bc6<br \/>\nLFP_JPEG \u662fJPEG\u683c\u5f0f\u6570\u636e,\u7528&#8221;image&#8221;\uff08\u5305\u62ec\u5f15\u53f7)\u6807\u8bc6<br \/>\nLFP_BLOCK_OF_IMAGES \u8fd9\u4e2a\u662fH264\u5757,\u7528&#8221;blockOfImagesRef&#8221;\uff08\u5305\u62ec\u5f15\u53f7)\u6807\u8bc6<\/p>\n<h1>2.behnam-python-lfp-reader<\/h1>\n<pre class=\"brush: bash; gutter: true\">git clone git:\/\/github.com\/behnam\/python-lfp-reader.git<\/pre>\n<p>\u4e3b\u8981\u662f\u88c5Gstreamer\u7684Python\u7ed1\u5b9a\u6bd4\u8f83\u9ebb\u70e6\uff0c\u4e0d\u80fd\u7528google code\u768410.7\u90a3\u4e2aOSSBuild\uff0c\u8981\u75282012\u7684\u90a3\u4e2a\uff0c\u800c\u4e14\u4e0d\u80fd\u540c\u65f6\u5b89\u88c5\u8fd9\u4e2a\u4e24\u4e2a\u3002\u4e0d\u8fc7\u5947\u602a\u7684\u662f\u5728\uff38\uff30\u7cfb\u7edf\u4e0a\u90a3\u4e48\u5feb\uff0c\u4e3a\u4f55\u5728\u6211\u7684\u7cfb\u7edf\u4e0a\u51e0\u4e4e\u8981\u51e0\u5206\u949f\u6765\u6267\u884cimport gst\u547d\u4ee4\u3002<span style=\"color: red;\">\u5de6\u952e\u6362\u7126\u70b9\uff0c\u4e2d\u952e\u5168\u805a\u7126\uff0c\u53f3\u952e\u5c0f\u5e45\u5ea6\u53d8\u5316\u89c6\u89d2\u3002<\/span>\u5bf9\u4e8e\u4ee3\u7801\u7684\u5206\u6790\uff0c\u6ca1\u6709\u592a\u5927\u7684\u6b32\u671b\u3002\u6240\u4ee5\u4e5f\u5c31\u53ea\u662f\u8c03\u8bd5\u4e0b\u8fd9\u4e2a\u9879\u76ee\u4ee3\u7801\u800c\u5df2\u3002<br \/>\n<a href=\"https:\/\/blog.rexdf.org\/wp-content\/uploads\/2013\/04\/lfp-reader.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1461 ls_lazyimg\" alt=\"lfp reader\" src=\"https:\/\/static.rexdf.org\/plugins\/images-lazyload-and-slideshow\/blank_1x1.gif\" file=\"https:\/\/blog.rexdf.org\/wp-content\/uploads\/2013\/04\/lfp-reader.png\" width=\"556\" height=\"599\" \/><noscript><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1461\" alt=\"lfp reader\" src=\"https:\/\/blog.rexdf.org\/wp-content\/uploads\/2013\/04\/lfp-reader.png\" width=\"556\" height=\"599\" srcset=\"https:\/\/static.rexdf.org\/uploads\/2013\/04\/lfp-reader.png 556w, https:\/\/static.rexdf.org\/uploads\/2013\/04\/lfp-reader-278x300.png 278w\" sizes=\"auto, (max-width: 556px) 100vw, 556px\" \/><\/noscript><\/a><\/p>\n<h1>3.Lytro: Image Viewer<\/h1>\n<pre class=\"brush: bash; gutter: true\">git clone git:\/\/github.com\/maxvw\/php-lytro.git<\/pre>\n<p>\u8fd9\u4e2a\u662fphp\u7248\u672c\u7684\uff0c\u672c\u6765\u6253\u7b97\u653e\u5230\u535a\u5ba2\u7a7a\u95f4\u4e0a\u9762\u7684\uff0c\u4f46\u662f\u624d\u53d1\u73b0\u535a\u5ba2\u662f\u91c7\u7528php5.2\uff0c\u5f00\u4e86tips\u95ee\u4e86\u4e0b\uff0c\u8bf4\u662f\u4e0d\u53ef\u4ee5\uff0c\u8981\u6211\u4e70VPS\u53ef\u4ee5\u81ea\u5df1\u6298\u817e\uff0c\u60f3\u60f3\u8fd9\u4e2a\u7a7a\u95f4\u5927\u7ea66\u6708\u4efd\u5c31\u5230\u671f\u4e86\uff0c\u5c31\u4e0d\u7eed\u8d39\u597d\u4e86\u3002\u56de\u5230\u8fd9\u4e2a\u8f6f\u4ef6\u4e0a\u4e86\uff0c\u8fd9\u4e2a\u662f\u7528php\u5b9e\u73b0\u7684\uff0c\u7528\u4e86namespace\u7b49\uff0c\u7528OO\u7684\u601d\u60f3\u5b9e\u73b0\u7684\uff0c\u56fe\u7247\u8fdb\u884c\u7f13\u5b58\u3002<br \/>\n<a href=\"https:\/\/blog.rexdf.org\/wp-content\/uploads\/2013\/04\/imageviewer.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1462 ls_lazyimg\" alt=\"imageviewer\" src=\"https:\/\/static.rexdf.org\/plugins\/images-lazyload-and-slideshow\/blank_1x1.gif\" file=\"https:\/\/blog.rexdf.org\/wp-content\/uploads\/2013\/04\/imageviewer.png\" width=\"768\" height=\"673\" \/><noscript><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1462\" alt=\"imageviewer\" src=\"https:\/\/blog.rexdf.org\/wp-content\/uploads\/2013\/04\/imageviewer.png\" width=\"768\" height=\"673\" srcset=\"https:\/\/static.rexdf.org\/uploads\/2013\/04\/imageviewer.png 768w, https:\/\/static.rexdf.org\/uploads\/2013\/04\/imageviewer-300x262.png 300w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/noscript><\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>\u7ecf\u8fc7\u4e00\u756a\u6298\u817e\uff0c\u5728\u6211\u768464\u4f4dWin8\u4e0a\u9762\u4e5f\u88c5\u4e0a\u4e86GSTreamer\u7684Python\u7ed1\u5b9a\uff0c\u7136\u540e\u5c31\u5f00\u59cb\u73a9behnam-python-lfp-reader\uff0c\u4e4b\u540e\u7ecf\u8fc7\u641c\u7d22\uff0c\u53d1\u73b0\u4e86\u4e00\u4e2a\u6807\u51c6C\u8bed\u8a00\u7248\u672c\u7684\uff0c\u548c\u4e00\u4e2a\u7528php\u7c7b\u5199\u7684\u7248\u672c\u3002 1.lfptools \u5f53\u7136\u5148clone\u4e0b\u6765 git clone\u00a0git:\/\/github.com\/nrpatel\/lfptools.git \u7136\u540e\u8fdb\u5165MingW cd \/e\/work\/lfptools\/ make \u6210\u529f\u7f16\u8bd1 \u73b0\u5728\u5c31\u5206\u6790\u4e0b\u6e90\u4ee3\u7801\u4e86 main\u51fd\u6570\u8fdb\u5165\u4e4b\u540e\u89e3\u6790\u547d\u4ee4\u884c\u7b2c\u4e00\u4e2a\u53c2\u6570\uff0c\u5e76\u8c03\u7528lfp_create\u6253\u5f00\uff0c\u8fc7\u7a0b\u5927\u7ea6\u5c31\u662f\uff0c\u7b97\u51fa\u6587\u4ef6\u957f\u5ea6\u5e76\u586b\u5165\u8868\u4e2d(\u4e8c\u8fdb\u5236\u5230\u4f4d\u4e2d\u95f4\u8f6c\u6362\u8fc7\u4e00\u6b21)\uff0c\u7136\u540e\u6574\u4e2a\u6309\u7167\u4e8c\u8fdb\u5236\u6587\u4ef6\u8bfb\u53d6\u51fa\u6765\u3002 \u63a5\u7740\u4fbf\u662f\u8c03\u7528lfp_file_check\u68c0\u6d4b\u662f\u5426\u662flfp\u683c\u5f0f\u7684\u6587\u4ef6\uff0clfp\u683c\u5f0f\u6587\u4ef6\u5f00\u5934\u6807\u5fd7\u4e3a0x89, 0x4C, 0x46, 0x50, 0x0D, 0x0A, 0x1A, 0x0A\u3002 \u4e0b\u4e00\u6b65\u5c31\u662f\u89e3\u6790lfp\u6587\u4ef6\u4e86\uff0clfp\u6570\u636e\u662f\u4e00\u5757\u4e00\u5757\u7684\uff0c\u6bcf\u5757\u90fd\u6709\u4e00\u4e2a\u9b54\u672f\u59343+1byte\uff0c\u7136\u540e\u5c31\u662f\u5757\u7684\u957f\u5ea6\uff0c\u8fd9\u662f\u4e00\u4e2a32bit\u7684\u6574\u6570\uff0c\u800c\u4e14\u5927\u7aef\u65b9\u5f0f\uff0c\u8f6c\u6362\u6210\u6b63\u5e38\u6574\u6570\u5373\u662f\u6570\u636e\u5757\u957f\u5ea6\uff0c\u4e4b\u540e\u5c31\u662f45bit SHA1+35bit Blank,\u63a5\u4e0b\u53bb\u5c31\u662f\u58f0\u660e\u957f\u5ea6\u7684\u5757\u6570\u636e\u4e86\u3002\u6570\u636e\u5757\u8bc6\u522b\u597d\u4ee5\u540e\u5c31\u662f\u8bc6\u522b\u6570\u636e\u5757\u7684\u7c7b\u578b\uff0c\u9996\u5148\u5bfb\u627e\u4e00\u4e2a\u201c\u201d\u5305\u542b\u7684\u5b57\u7b26\u4e32\uff0c\u4ece\u5904\u7406\u4e0a\u770b\uff0c\u5e94\u8be5\u5305\u62ec\u4ee5\u4e0b\u51e0\u79cd\u7c7b\u578b\uff1a LFP_RAW_IMAGE\u5e94\u8be5\u5c31\u662f\u666e\u901a\u7684\u56fe\u7247\u683c\u5f0f\u4e86\uff0c\u8c03\u7528converted_image\u51fd\u6570\u5904\u7406\uff0c\u4f3c\u4e4e\u5c31\u662f\u628a3*8bit\u7684\u6570\u636e\u8f6c\u6362\u6210\u5982\u4e0b\u7684\u4e24\u4e2a16\u4f4d\u6570\u636e\u3002 LFP_JSON \u6570\u636e\u540d\u5b57,\u5047\u8bbe\u5176\u4ed6\u4e0d\u662f&#8221;imageRef&#8221;\u6807\u8bc6\u7684 LFP_DEPTH_LUT \u6df1\u5ea6\u4fe1\u606f\uff0c\u662f4*8bit\u4e00\u4e2a32\u4f4d\u7684float\u683c\u5f0f\u3002\u7528&#8221;depth&#8221;\uff08\u5305\u62ec\u5f15\u53f7)\u6807\u8bc6 LFP_LUT \u662fLytro\u7b2c\u4e8c\u7248\u672c\u6709\u7684\uff0c\u7528&#8221;lut&#8221;\uff08\u5305\u62ec\u5f15\u53f7)\u6807\u8bc6 LFP_JPEG \u662fJPEG\u683c\u5f0f\u6570\u636e,\u7528&#8221;image&#8221;\uff08\u5305\u62ec\u5f15\u53f7)\u6807\u8bc6 LFP_BLOCK_OF_IMAGES \u8fd9\u4e2a\u662fH264\u5757,\u7528&#8221;blockOfImagesRef&#8221;\uff08\u5305\u62ec\u5f15\u53f7)\u6807\u8bc6 2.behnam-python-lfp-reader git clone git:\/\/github.com\/behnam\/python-lfp-reader.git \u4e3b\u8981\u662f\u88c5Gstreamer\u7684Python\u7ed1\u5b9a\u6bd4\u8f83\u9ebb\u70e6\uff0c\u4e0d\u80fd\u7528google code\u768410.7\u90a3\u4e2aOSSBuild\uff0c\u8981\u75282012\u7684\u90a3\u4e2a\uff0c\u800c\u4e14\u4e0d\u80fd\u540c\u65f6\u5b89\u88c5\u8fd9\u4e2a\u4e24\u4e2a\u3002\u4e0d\u8fc7\u5947\u602a\u7684\u662f\u5728\uff38\uff30\u7cfb\u7edf\u4e0a\u90a3\u4e48\u5feb\uff0c\u4e3a\u4f55\u5728\u6211\u7684\u7cfb\u7edf\u4e0a\u51e0\u4e4e\u8981\u51e0\u5206\u949f\u6765\u6267\u884cimport &hellip; <a href=\"https:\/\/blog.rexdf.org\/en\/2013\/04\/lfp%e6%96%87%e4%bb%b6%e6%a0%bc%e5%bc%8f%e8%a7%a3%e6%9e%90\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[18],"tags":[134],"class_list":["post-1458","post","type-post","status-publish","format-standard","hentry","category-program","tag-lfp-"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.rexdf.org\/en\/wp-json\/wp\/v2\/posts\/1458","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.rexdf.org\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.rexdf.org\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.rexdf.org\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.rexdf.org\/en\/wp-json\/wp\/v2\/comments?post=1458"}],"version-history":[{"count":0,"href":"https:\/\/blog.rexdf.org\/en\/wp-json\/wp\/v2\/posts\/1458\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.rexdf.org\/en\/wp-json\/wp\/v2\/media?parent=1458"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.rexdf.org\/en\/wp-json\/wp\/v2\/categories?post=1458"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.rexdf.org\/en\/wp-json\/wp\/v2\/tags?post=1458"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}