{"id":187,"date":"2018-07-05T23:47:25","date_gmt":"2018-07-05T14:47:25","guid":{"rendered":"http:\/\/www.ohmaker.net\/?p=187"},"modified":"2018-07-05T23:47:25","modified_gmt":"2018-07-05T14:47:25","slug":"raspberry-pi-zero-w-camera","status":"publish","type":"post","link":"http:\/\/www.ohmaker.net\/2018\/07\/05\/raspberry-pi-zero-w-camera\/","title":{"rendered":"raspberry pi zero w\u306b\u30ab\u30e1\u30e9\u3064\u306a\u3044\u3067\u64ae\u5f71\u3057\u3066\u307f\u308b"},"content":{"rendered":"

Raspberry Pi Zero W\u3068\u30ab\u30e1\u30e9\u30ad\u30c3\u30c8\u5165\u624b<\/h3>\n

Raspberry Pi Zero W\u3068\u30b9\u30d1\u30a4\u30ab\u30e1\u30e9\u304c\u30bb\u30c3\u30c8\u306b\u306a\u3063\u305f\u30c0\u30f3\u30dc\u30fc\u30eb\u30ab\u30e1\u30e9\u30ad\u30c3\u30c8\u3092\u8cfc\u5165\u3057\u307e\u3057\u305f\u3002<\/p>\n

\u30ad\u30c3\u30c8\u306e\u5185\u5bb9\u306f\u3001Raspberry Pi Zero W\u672c\u4f53\u3068\u3001zero\u7528\u30b9\u30d1\u30a4\u30ab\u30e1\u30e9(CAM003)\u3001\u30c0\u30f3\u30dc\u30fc\u30eb\u306e\u30ab\u30e1\u30e9\u30b1\u30fc\u30b9\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u3002(\u5199\u771f\u306eZero W\u306fGPIO\u63a5\u7d9a\u5f8c\u306e\u72b6\u614b)<\/p>\n

https:\/\/raspberry-pi.ksyic.com\/main\/index\/pdp.id\/278\/pdp.open\/278<\/a><\/p>\n

\u30b9\u30d1\u30a4\u30ab\u30e1\u30e9\u306f\u53ef\u8996\u5149\u30bf\u30a4\u30d7\u3068\u8d64\u5916\u7dda\u30bf\u30a4\u30d7\u304c\u3042\u308b\u3088\u3046\u3067\u3059\u304c\u3001\u4eca\u56de\u306f\u53ef\u8996\u5149\u306e\u307b\u3046\u3092\u8cfc\u5165\u3057\u307e\u3057\u305f\u3002<\/p>\n

 <\/p>\n

\"\"<\/p>\n

\"\"<\/p>\n

\u7d44\u307f\u7acb\u3066\u308b\u3068\u3053\u3093\u306a\u304b\u3093\u3058\u3002<\/p>\n

\u305d\u306e\u307e\u307e\u3060\u3068GPIO\u7aef\u5b50\u306b\u5e72\u6e09\u3057\u3066\u3057\u307e\u3063\u305f\u306e\u3067\u3001\u90e8\u54c1\u3092\u7701\u3044\u305f\u308a\u3001\u7a74\u3092\u958b\u3051\u305f\u308a\u3057\u307e\u3057\u305f\u3002<\/p>\n

\"\"<\/p>\n

\"\"<\/p>\n

<\/h3>\n

\u30ab\u30e1\u30e9\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7<\/h3>\n

\u307e\u305a\u306f\u3001\u30e9\u30ba\u30d1\u30a4 Zero W\u3067\u30ab\u30e1\u30e9\u3092\u4f7f\u7528\u3067\u304d\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n

sudo raspi-config<\/code><\/p>\n

\u3067\u8a2d\u5b9a\u753b\u9762\u3092\u958b\u304d\u3001\u300cInterfacing Options\u300d\u2192\u300cCamera\u300d\u3067\u30ab\u30e1\u30e9\u3092Enable\u306b\u3057\u3001\u518d\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n

\"\"<\/p>\n

\"\"<\/p>\n

\"\"<\/p>\n

GUI\u64cd\u4f5c\u3067\u30b9\u30bf\u30fc\u30c8\u30e1\u30cb\u30e5\u30fc\u2192\u300cPreferences\u300d\u2192\u300cRaspberry Pi Configuration\u300d\u3067\u3082OK\u3002
\n\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u753b\u9762\u3067\u8a2d\u5b9a\u3067\u304d\u307e\u3059\u3002
\n\"\"<\/p>\n

<\/h3>\n

\u63a5\u7d9a\u78ba\u8a8d<\/h3>\n

\u30e9\u30ba\u30d1\u30a4\u306b\u30ab\u30e1\u30e9\u3092\u7e4b\u3044\u3060\u3089\u3001\u6b21\u306e\u30b3\u30de\u30f3\u30c9\u3067\u63a5\u7d9a\u72b6\u614b\u3092\u30c1\u30a7\u30c3\u30af\u3057\u307e\u3059\u3002
\n$ vcgencmd get_camera
\nsupported=1 detected=1<\/code><\/p>\n

vcgencmd<\/code>\u306f\u30e9\u30ba\u30d1\u30a4\u306e\u30b7\u30b9\u30c6\u30e0\u8a2d\u5b9a\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3067\u3059\u3002
\n\u4e0a\u8a18\u306fdetect=1<\/code>\u306a\u306e\u3067\u3001\u63a5\u7d9aOK\u3067\u3059\u3002
\n\u305f\u307e\u306b\u63a5\u89e6\u304c\u60aa\u3044\u306e\u304bdetect=0<\/code>\u306b\u306a\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n

\uff08\u53c2\u8003\uff09 RPI vcgencmd usage
\n
https:\/\/elinux.org\/RPI_vcgencmd_usage<\/a><\/p>\n

<\/h3>\n

\u30b3\u30de\u30f3\u30c9\u3067\u64ae\u5f71\u3057\u3066\u307f\u308b<\/h3>\n

\u3068\u308a\u3042\u3048\u305a\u8a66\u3057\u306b\u5199\u771f\u3092\u64ae\u3063\u3066\u307f\u307e\u3057\u3087\u3046\u3002
\n\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3067\u64ae\u5f71\u3067\u304d\u307e\u3059\u3002<\/p>\n

raspistill -o cam.jp<\/code><\/p>\n

<\/h3>\n

python\u3067\u64ae\u5f71\u3057\u3066\u307f\u308b<\/h3>\n

\u30b5\u30f3\u30d7\u30eb\u307e\u3093\u307e\u3067\u3059\u304c\u3001Python\u3067\u30d7\u30ec\u30d3\u30e5\u30fc\u8868\u793a\u3084\u64ae\u5f71\u3082\u7c21\u5358\u306b\u3067\u304d\u307e\u3059\u3002<\/p>\n


\nfrom picamera import PiCamera
\nfrom time import sleep<\/p>\n

camera.start_preview()
\nsleep(5)
\ncamera.capture('\/home\/pi\/Desktop\/image.jpg')
\ncamera.stop_preview()
\n<\/code><\/p>\n

\u8a66\u3057\u306b\u64ae\u3063\u3066\u307f\u305f<\/h3>\n

\u5b9f\u969b\u306b\u5ba4\u5185\u3067\u64ae\u5f71\u3057\u305f\u5199\u771f\u306f\u3053\u3061\u3089\u3002<\/p>\n

\u306a\u3093\u304b\u6697\u3044\u30fb\u30fb\u30fb\u30db\u30ef\u30a4\u30c8\u30d0\u30e9\u30f3\u30b9\u3082\u3061\u3087\u3063\u3068\u5909\u3002<\/p>\n

\u3044\u308d\u3044\u308d\u8a2d\u5b9a\u3044\u3058\u308c\u308b\u3088\u3046\u306a\u306e\u3067\u3001\u5de5\u592b\u3059\u308c\u3070\u3082\u3046\u3061\u3087\u3063\u3068\u304d\u308c\u3044\u306b\u306a\u308b\u306e\u304b\u3082\u3002<\/p>\n

\"\"<\/h3>\n

\u3061\u306a\u307f\u306b\u30b9\u30de\u30db(Galaxy S8)\u3067\u64ae\u308b\u3068\u3053\u3093\u306a\u611f\u3058\u3002<\/p>\n

\"\"<\/h3>\n

 <\/p>\n

\u304a\u308f\u308a\u306b<\/h3>\n

\u521d\u3081\u3066\u30e9\u30ba\u30d1\u30a4\u3067\u30ab\u30e1\u30e9\u3092\u4f7f\u3063\u3066\u307f\u307e\u3057\u305f\u304c\u3001\u30bb\u30c3\u30c8\u30a2\u30c3\u30d7\u304b\u3089\u64ae\u5f71\u307e\u3067\u3068\u3066\u3082\u7c21\u5358\u306b\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n

\u30db\u30ef\u30a4\u30c8\u30d0\u30e9\u30f3\u30b9\u306a\u3069\u3082\u30b3\u30de\u30f3\u30c9\u306e\u30aa\u30d7\u30b7\u30e7\u30f3\u3067\u5909\u3048\u3089\u308c\u308b\u3088\u3046\u306a\u306e\u3067\u3001\u3044\u308d\u3044\u308d\u8a66\u3057\u3066\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n

\u305f\u3060\u3001\u753b\u8cea\u306f\u7d50\u69cb\u6b8b\u5ff5\u306a\u611f\u3058\u3067\u3057\u305f\u306d\u3002\u3002\u3002Zero\u3058\u3083\u306a\u3044\u307b\u3046\u3067\u3082\u4f7f\u3048\u308b\u3001Camera V2\u304c\u6b32\u3057\u304f\u306a\u3063\u3066\u3057\u307e\u3044\u3057\u305f\u3002<\/p>\n

\u307e\u305f\u3001\u4f55\u679a\u3082\u64ae\u5f71\u3057\u3066\u3044\u308b\u3068\u3001\u30e9\u30ba\u30d1\u30a4\u306e\u52d5\u4f5c\u304c\u91cd\u304f\u306a\u3063\u3066\u53cd\u5fdc\u3057\u306a\u304f\u306a\u308b\u3053\u3068\u3082\u3042\u308a\u3001\u30b7\u30e3\u30c3\u30bf\u30fc\u30c1\u30e3\u30f3\u30b9\u3092\u9003\u305b\u306a\u3044\u4f7f\u3044\u65b9\u306b\u306f\u5411\u3044\u3066\u306a\u3055\u305d\u3046\u3067\u3059\u3002<\/p>\n

\u30d7\u30ed\u30b0\u30e9\u30e0\u304b\u3089\u3082\u5bb9\u6613\u306b\u64ae\u5f71\u53ef\u80fd\u306a\u306e\u3067\u3001Alexa\u306a\u3069\u4ed6\u306e\u6a5f\u5668\u3068\u306e\u9023\u643a\u306b\u3082\u6311\u6226\u3057\u3066\u307f\u305f\u3044\u3067\u3059\u306d\u3002<\/p>\n

 <\/p>\n

\u53c2\u8003<\/h3>\n

https:\/\/www.raspberrypi.org\/documentation\/usage\/camera\/README.md<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"

Raspberry Pi Zero W\u3068\u30ab\u30e1\u30e9\u30ad\u30c3\u30c8\u5165\u624b Raspberry Pi Zero W\u3068\u30b9\u30d1\u30a4\u30ab\u30e1\u30e9\u304c\u30bb\u30c3\u30c8\u306b\u306a\u3063\u305f\u30c0\u30f3\u30dc\u30fc\u30eb\u30ab\u30e1\u30e9\u30ad\u30c3\u30c8\u3092\u8cfc\u5165\u3057\u307e\u3057\u305f\u3002 \u30ad\u30c3\u30c8\u306e\u5185\u5bb9\u306f\u3001Raspberry Pi Zero W<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"gallery","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"footnotes":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[11],"tags":[12],"jetpack_publicize_connections":[],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9v1Q5-31","_links":{"self":[{"href":"http:\/\/www.ohmaker.net\/wp-json\/wp\/v2\/posts\/187"}],"collection":[{"href":"http:\/\/www.ohmaker.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ohmaker.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ohmaker.net\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ohmaker.net\/wp-json\/wp\/v2\/comments?post=187"}],"version-history":[{"count":12,"href":"http:\/\/www.ohmaker.net\/wp-json\/wp\/v2\/posts\/187\/revisions"}],"predecessor-version":[{"id":594,"href":"http:\/\/www.ohmaker.net\/wp-json\/wp\/v2\/posts\/187\/revisions\/594"}],"wp:attachment":[{"href":"http:\/\/www.ohmaker.net\/wp-json\/wp\/v2\/media?parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ohmaker.net\/wp-json\/wp\/v2\/categories?post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ohmaker.net\/wp-json\/wp\/v2\/tags?post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}