We don't grow when things are easy. We grow when we face challenges.
Don't wanna be here? Send us removal request.
Photo



ในบางครั้งเราไม่ได้จับ Raspberry pi มานานเเล้วเราทำการ Update และ Upgrade จะพบว่าตัว computer ไม่สามารถที่จะเชื่อมต่อ หรืออะไรที่เคยทำได้ วันนี้มันอาจจะทำไม่ได้ก็ได้ หลังจากที่ทำการ Update
ด้วยปัญหาของผมคือลองทำการ Remote ด้วย VNC เเล้วไม่สามารถเชื่อมต่อได้ ลองลบ VNC ตัวเก่าใน Computer ของท่านเเล้วโหลดเพื่อเอา version ใหม่ หรือทำด้วยวิธีดังรูปและ link ข้างล่างเป็นผลให้แก้ปัญหาที่เกิดขึ้นได้
https://support.realvnc.com/knowledgebase/article/View/241/1/timed-out-waiting-for-a-response-from-the-host-computer
****การ updadate program ไม่ได้ดีเสมอไป****
0 notes
Text
ข้อมูลเพิ่มเติม
คู่มือการใช้งาน
https://drive.google.com/file/d/0B__u12qlAyrXQkRLeTVGMXF3bTg/view
blog
https://raspberrypi-thailand.blogspot.com/
http://raspberrypituts.com/
https://www.raspberrypi.org/blog/
http://www.raspberrypiblog.com/
https://www.theraspberrypiguy.com/blog/
https://thepihut.com/blogs/raspberry-pi-roundup
http://blog.pimoroni.com/
https://www.raspberrypi-spy.co.uk/
http://www.recantha.co.uk/blog/
http://www.rpiblog.com/
https://eltechs.com/category/blog/
https://raspberryblog.de/
http://www.rpiblog.com/
https://blog.adafruit.com/category/raspberry-pi/
https://hackaday.com/category/raspberry-pi-2/
http://embedded-lab.com/blog/category/raspberry-pie/
http://ozzmaker.com/category/raspberry-pi/ เน้นศึกษา
https://catlamin.com/category/education/raspberry-pi/
https://hemstreet.io/category/raspberry-pi/
Videos
https://www.youtube.com/user/TheRaspberryPiGuy
https://www.youtube.com/user/RaspberryPiBeginners
โครงงาน (ต่างประเทศ)
https://hackaday.io/projects?tag=raspberry+pi
https://www.raspberrypi.org/resources/make/
http://www.instructables.com/id/Raspberry-Pi-Projects/
จำหน่าย (Thailand) ** บางแห่งไม่ได้จำหน่ายบอร์ดแต่จำหน่ายอุปกรณ์เสริม
http://www.thaieasyelec.com/raspberry-pi-brand.html
https://www.arduinothai.com/category/10/embedded-linux/raspberry-pi-2
http://th.rs-online.com/web/generalDisplay.html?id=raspberrypi
https://inex.co.th/shop/
https://www.mosfex.com/category/3/raspberry-pi
https://www.facebook.com/RaspberryPi66
https://www.gravitechthai.com/index.php
http://www.satorshop.com/category/1/raspberry-pi-2/raspberry-pi-3-model-b
https://www.arduinoall.com/category/120/raspberry-pi
http://www.myarduino.net/category/114/raspberry-pi
https://www.arduitronics.com/category/4/raspberry-pi
http://www.raspberryhome.net
Course อบรม (Link ไปยังเว็บ, Facebook ที่เคยเปิดอบรม ของไทย)
http://bit.ly/2l07jeJ
http://bit.ly/2yAueT7
http://www.dronecademy.org/contact/
http://tinyurl.com/yal7n5hs
0 notes
Photo


ในการ Remote ด้วยวิธีของ VNC viewer
จะพบว่าการจะรีโมทด้วย vnc จะต้องลง2 อย่างในตัว Note book ของเราประกอบไปด้วย VNC server เเละ VNC viewver เเล้วเราจะพบว่า ตัวบอร์ด Raspbery pi จะ ทำการลงโปรแกรมให้เองโดยอัตโนมัติจาก IP Address ของเรานั้นเอง
****ทั้งนี้การ ใช้VNC viewver จะพบว่าสามารถ ทำการ รีโมทได้ไวกว่าวิธีก่อนหน้าเป็นอย่างมาก แม้จะขึ้นกับความเร็วเน็ต ด้วยก็ตาม****
สามารถ Download ได้ตามลิ้งค์ข้างล่าง
https://www.realvnc.com/en/raspberrypi/
ต่อมาให้เราทำการ พิมพ์ที่ TLX
sudo nano /boot/config.txt
เเล้วเลื่อนลงมานิดหน่อยในส่วนของ HDMI
เพื่อที่จะทำให้ภาพของการแสดงผล Raspberrypi ของเราชัดขึ้น
ให้พิมพ์
hdmi_ignore_edid=0xa5000080
hdmi_group=2 ;หมายถึงการแสดงผลผ่าน HDMI
hdmi_mode=85
ทั้งนี้ 85 มีความหมายว่าภาพที่เราต้องการจะได้ให้เป็น 1280x720@ 60Hz
16 จะได้ 1204x768@ 60Hz
77 2560x1600 @60 Hz
จากนั้นให้กด ctrl+o และ Enter ก่อน ctrl+x เพื่อออกจากระบบ
ซี่งหากเราอยากจะให้มันสัมพันธ์กับ กล้อง Raspberry pi ตัวใหม่นี้
เราจำเป็นที่จะต้อง set up มันก่อนด้วยคำสั่ง
cd Desktop
mkdir cookie
cd cookie
จากนั้นลองทดสอบว่ากล้องใช้ได้หรือไม่
raspistill -o image.jpg -t 1000
และอัดวิดิโอด้วย
raspivid -o asdf.h264
สามารถ check option อื่นๆได้ที่ raspistill --help
****ข้อสังเกตุ วิดิโอของเราเมื่อเปิดใน ตัว raspberry pi จะไม่ใชัดให้เรา โหลดเข้ามาเปิดในคอมจะพบว่ามันชัดขึ้นเเละไม่กระตุก!!!*****
โดยเราจะต้องเเปลงไฟล์จาก .h264 เป็น MP4 เสียก่อนโดยใช้คำสั่ง
MP4Box -add .....ชื่อวิดิโอ.h264 convertedVideo.mp4 เพียงเท่านี้ก็เสร็จเเล้ว
ต่อมาเราต้องการที่จะสร้าง วัน - เวลาบนภาพที่ถ่ายจาก raspberrypi
โดยเราจะใช้คำสั่ง
sudo apt-get install imagemagick
/usr/bin/convert /home/pi/Desktop/cookie/newimage.jpg -pointsize 32 -fill red -annotate +700+500 ‘mink’ /home/pi/Desktop/cookie/newimage.jpg
****************************หรืออีกเทคนิคหนึ่งคือการสั่งไฟล์ให้เล่นวิดิโอด้วยการสั่ง**********
omxplayer _1วรรค_ ตามด้วยชื่อไฟล์วิดิโอ.h264
เช่น omxplayer 123.h264
***********************Tip------ กล้อง Rapberry pi เราสามารถหมุนปรับกระบอกโฟกัสได้นิดหน่อยจากกระบอกข้างในสีดำ********* เนื่องจากปัญหาตอนแรกกล้องเบลอปัจจุบันเเก้ไขได้เเล้ว
0 notes
Photo
การสำรองข้อมูล SD card ในกรณีที่เราจะทำการBackup ข้อมูลกันพลาด
ให้เราเข้าไปที่โปรแกรม Win32 Disk imager จากนั้นสังเกตุตรงช่อง Device ว่าเป็นช่องที่ SD เรา เสียบอยู่หรือไม่เเละทำการเลือก location ที่จะทำการสร้างโฟรเดอร์ข้อมูลในรูปแบบไฟล์ของ .img .....จบ.......
เเละหากจะทำการใช้งาน เราก็เพียงเเค่ ใช้โปรแกรม Win32 Disk imager ในการลงข้อมูล
ก็เข้าไปที่ ไฟล์ .img เเละทำการ write คืน sd Card เพียงเท่านี้ก็จบเรียบร้อย
*****การformat จะพบว่าเราไม่สามารถ format ด้วยวิธีที่ปกติได้เราจำเป็นที่จะไช้โปรแกรมอื่นเข้ามาช่วยชื่อโปรแกรม lexar_usb_format ******
เนื่องจากใน SD card จะพบว่าพื้นที่การใช้งานนั้นได้หายไป เราจึงต้องใช้โปรแกรมนี้ในการช่วยลบเนื่องจากเราใช้ OS ของลินุกซ์ เเล้วมาเปิดใน window เครื่องจึงมองไม่เห็น
0 notes
Photo



การ Stream ด้วยกล้อง Raspberry pi camara ***** แต่ไม่เเนะนำเพราะคุณภาพของกล้อง Rapberry pi จะสู้พวก web cam ไม่ได้เพราะในงานของเราจะประยุกต์ใช้ ฉะนั้นเราจะต้องเลือกให้ตัวใด ตัวหนึ่งเป็น Vision เเละอีกตัวเป็นตัวถ่ายภาพ เป็นต้น
lสิ่งที่จำเป็นเราจะติดตั้งตัว compiler ที่ต้องใช้ก่อน
sudo apt-get install libjpeg8-dev imagemagick libv4l-dev make gcc git cmake g++
เอาโค้ดจาก get repository
git clone https://github.com/jacksonliam/mjpg-streamer.git
จากนั้นสั่ง make
cd mjpg-streamer/mjpg-streamer-experimental
make mjpg_streamer input_file.so output_http.so input_uvc.so
sudo mkdir /usr/local/mjpg-streamer
sudo cp mjpg_streamer /usr/local/mjpg-streamer
sudo cp output_http.so input_file.so input_uvc.so /usr/local/mjpg-streamer
sudo cp -r www /usr/local/mjpg-streamer
ตั้งค่า upstart
cd /etc/init.d
sudo wget http://www.repetier-server.com/en/software/extras/mjpgstreamer-init-debian/mjpgstreamer
sudo chmod 755 mjpgstreamer
sudo update-rc.d mjpgstreamer defaults
ติดตั้ง v4l utils เพิ่มเติม
sudo apt-get install v4l-utils
สั่งโหลด kernel driver ดังนี้
sudo modprobe bcm2835-v4l2
จากนั้นสั่ง start MJPG-streamer ดังนี้
sudo /etc/init.d/mjpgstreamer start
ดูสถานะว่า MJPG-streamer ทำงานหรือไม่
sudo /etc/init.d/mjpgstreamer status
ถ้าสถานะ OK ก็เปิดเว็บเบราเซอร์ไปที่ http://your-ip-address:8080 ได้เลยก็จะเจอหน้าจอแบบนี้
0 notes
Photo



การเชื่อมต่อ Vision ด้วย webcam พร้อมกับใช้กล้อง Raspberrypi ในการถ่ายรูป
การเชื่อมต่อ Raspberry pi with Motion ด้วยเทคนิคนำ Motion มาเเสดงผลหน้า Web Browser หรือโปรแกรม VLC media player โดยใช้ Raspberry pi เป็นตัวประมวลผลเเละจัดการต่างๆ
sudo apt-get install vlc
ซึ่งขั้นตอนแรกเราจะต้องทำการ อัพเดทโปรแกรมต่างๆเสมอโดยใช้
sudo apt-get update sudo apt-get upgrade
จากนั้นทำการติดตั้ง motion
sudo apt-get install motion เเล้วจากนั้นก็ กดY ต่อ
หลังจากลงเสร็จเราสามารถใช้ คำสั่ง lsusb เพื่อที่จะทำการตรวจสอบข้อมูลว่ากล้องของเราที่ได้นั้น ขึ้นชื่อหรือไม่ลองอ่านดูจะมีชื่อกล้องต่างๆว่าขึ้นหรือไม่ เช่น Microdia Camera
ทีนี้เราก็จะมาทำการปรับเเก้ด้วย
sudo nano /etc/default/motion จากนั้นจะมีหน้าต่างสีดำขึ้นมาให้เราเปลี่ยนจากคำว่า No ให้เป็น yes
เมื่อเปลี่ยนเป็น Yes แล้วให้กด CTRL+O จากนั้นให้กด Enter ต่อไปเมื่อแก้ไขเสร็จเเล้ว ให้กด CTRL+X เพื่อทำการออกจากระบบ
ที่นี้เราจะทำการแก้ config
ให้เรากด sudo nano /etc/motion/motion.conf
ซึ่งหากสังเกตุดีๆจะพบว่า versionของกล้อง เป็นเวอร์ชั่น 4.0 ของMotion และมุมบนอยู่ที่ GNU nano 2.7.4
1.แล้วทำการแก้ daemon off เป็น daemon on
2.ต่อมาให้กด CTRL +W เพื่อหา Framerate จาก 2 ให้เปลี่ยนเป็น 1500 (สำหรับเว๊ปเเคม) อย่างน้อย 1พัน **** ตรงนี้ปรับไปสัก 50,000 ก็ได้เเต่สุดท้ายมันก็สุดในศักยภาพของกล้องมันเท่านั้น
3.เเล้วไปหา Live Stream Server
เพื่อเปลี่ยน Stream_port 8081
Stream_localhost จาก On เป็น Off
4.ไปที่ HTTP Based Control
เปลี่ยน webcontrol_localhost จาก On เป็น Off
5.ไปที่ Quality จาก 75 เป็น 100
6.ไปที่ Image width 640 hight 480 brightness 20 ซึ่งจะอยู่ข้างล่างของ auto_brightness /// เพื่อปรับแก้ขนาดของ Pixel โดยให้ width เป็น1260 และ height 720 ก็ได้
7.ไปที่ post_capture เปลี่ยนเป็นที่ 5
ก่อนที่จะกด Enter และ CTRL+X ออกมา
จากนั้นทำการทดสอบตัวกล้องไปที่
sudo service motion restart
sudo motion และมองหาไอพี Address จาก ifconfig
เพียงเท่านี้เราก็เข้าไปที่ google chome แล้วพิมพ์ IP ของเราไป 192.xxx.x.xxx:8081 ตามนั้นเท่ากับว่าเสร็จเป็นที่เรียบร้อย
*********************************ยกตัวอย่างการสั่งถ่ายภาพ************************
raspistill -hf -o image.jpg -w 640 -h 480
*************************************************************************************
คำสั่ง
รีระบบเครื่อง sudo reboot ปิดเครื่อง sudo halt
0 notes
Text
Spec ชิปกล้อง
IMX219PQRaspberry Pi for Camera Module V2
https://www.raspberrypi.org/products/camera-module-v2/
The customer will be transferred to the site of the Raspberry Pi Foundation.Diagonal 4.6 mm (Type 1/4.0) 8.08M-Effective Pixel Color CMOS Image Sensor
CMOS Image Sensor for Mobile Products (Smartphones or Tablets) Enabling HD Video Imaging at 180 Frame/s
Sony is releasing "IMX219PQ", Type 1/4.0, approximately 8.08M effective pixels, back-illuminated CMOS image sensor for the growing mobile market. The IMX219PQ satisfies the fulfillment performance of "high sensitivity" and "high frame rate imaging" to meet the demands for high-quality camera applications, and can be easily put on camera fronts of stylish and slim bezel devices achieved by the reduced size. Not only the normal rate of all-8M pixels at full field of view and 30 frame/s, 4 times faster imaging is also possible by 2 × 2 analog binning mode. Also, a LSC function*1 corrects optical unevenness to adjust during the module fabrication process, and contributes to suppressing of system cost. Additionally, combining with a rear-end ISP supporting of BME-HDR*2 enables future scalability of the high-dynamic-range video imaging.
*1: Lens Shading Correction function *2: Two different exposure controls supporting Binning Multiplexed Exposure HDR
High-speed video imaging function
Lens Shading Correction function (LSC)
Supports BME-HDR
Easy to replace the existing product IMX111
* Exmor R is a trademark of Sony Corporation. The Exmor R is a Sony's CMOS image sensor with significantly enhanced imaging characteristics including sensitivity and low noise by changing fundamental structure of ExmorTM pixel adopted column parallel A/D converter to back-illuminated type.
High-Speed Video Imaging Function
Not only the simultaneous still picture and video imaging at 30 frame/s in all pixels (no shutter lag and simultaneous recording), but also 4 times faster imaging became possible by 2 × 2 analog binning mode. This enables HD video recording with 2M pixels at full field of view and 120 frame/s, or 1280 × 720 pixels of 16:9 aspect ratio at 180 frame/s. (Using MIPI 4Lane) Slow-motion recording using this function reproduces dynamic movements into a smooth video (See moving image 1.) in sports scene recording, and sensitive movements or expressions beyond human vision can be captured. (See moving image 2.) The IMX219PQ fulfills camera features and also provides an exciting new experience for all of customers, enabling Sony and the IMX219PQ to contribute to the functional differentiation of smartphone cameras. (See table 1.)
Lens Shading Correction Function
The IMX219PQ has a lens shading correction function with four independent colors. It can be used for not only normal lens shading correction, and also can serve as an individual module adjustment of deviation in the lens assembly process during the module fabrication. Calibration data is written in a built-in OTP during the module inspection to contribute to the short loading time when the camera is turned on. One from three tables can be selected according to color temperature and there exists two-table blending mode for interpolation.
Supports BME-HDR
To support BME-HDR function (See figure 1.) of the existing products IMX134/135*3 that Sony introduced to the market preceding the IMX219PQ, the sensor features a function of the basic technology to set two different exposure conditions. Furthermore, synthesizing from these two different exposure conditions by ISP (Image Signal Processor chip) and applying tone curve optimization enables HDR video recording.
*3: 2012 August 20th News Releases http://www.sony.net/SonyInfo/News/Press/201208/12-107E/
Easy to Replace the Existing Product IMX111
The IMX219PQ retains the equivalent electrical characteristics, spectral sensitivity characteristics, and CRA curve of the existing product IMX111. At the same time, it adds functions to improve picture quality and high-speed imaging, and supports MIPI 2Lane mode in addition to 4Lane mode. Consequently, small firmware modification can replace this latest image sensor functionally enhanced with ease. (See table 2 and figure 2.)
Moving Image 1 Tennis (Serve) Recording at 180 frame/s
*Recorded with a sample module, the actual picture quality of the image sensor might be different.
Moving Image 2 Dog Agility Slalom Recording at 180 frame/s
*Recorded with a sample module, the actual picture quality of the image sensor might be different.
Figure 1 About BME HDR
An image processing technology for subjects with high contrast. It synthesizes different exposure conditions into an image so that both bright and dark data can be seen at the same time.
Figure 2 Target CRA (Compared with the IMX111)
Table 1 Imaging Size and Frame RateSizeFrame rateRemarks
3280 × 2464 (full size)30 frame/s
1640 × 1232 (1/4 size)120 frame/s
1408 × 792 (full FOV for 1280 x 720 HD video)180 frame/s*High-sensitivity mode
1280 × 720 (720 at HD, cropping)198 frame/s*High-sensitivity mode
960 × 540 (QHD, cropping)240 frame/s*High-sensitivity mode
Table 2 Device ComparisonItemIMX111PQIMX219PQ
Image sizeDiagonal 4.60 mm (Type 1/4.0)Diagonal 4.60 mm (Type 1/4.0)
Total number of pixels3296 (H) x 2512 (V)
Approx. 8.28M pixels3296 (H) x 2512 (V)
Approx. 8.28M pixels
Number of active pixels3280 (H) x 2464 (V)
Approx. 8.08M pixels3280 (H) x 2464 (V)
Approx. 8.08M pixels
Fabrication processBack-illuminated processBack-illuminated process
Unit cell size1.12 µm (H) × 1.12 µm (V)1.12 µm (H) × 1.12 µm (V)
Output formatMIPI 2, 1 LaneMIPI 4, 2 Lane
Control communication interfaceI
2
CI
2
C fast mode plus (1 MHz)
Power supply
specificationsAnalog2.7 +0.2/-0.1 V2.8 ± 0.2 V
Digital1.2 ± 0.1 V1.2 +0.1/-0.12 V
I/O1.8 ± 0.1 V1.8 ± 0.18 V
PGA41.7 dB (Max.)44.56 dB (Max.)
Input clock frequency6 to 60 MHz6 to 27 MHz
Signal processing function within sensor
Spot pixel compensation✔✔
Moving picture specifications720p60 frame/s
540M bps/Lane × 2 Lane180 frame/s
726M bps/Lane × 4 Lane
1080p30 frame/s
405M bps/Lane × 2 Lane60 frame/s
726M bps/lane × 4 Lane
*Sony reserves the right to change products and specifications without prior notice.
VOICE
Compared to existing products, we have developed IMX219PQ to achieve "more appealing functions for more users" and launched it on the mobile market. We operate technical support centers in each region (three cities in China, Taiwan, US, and UK) besides Japan. Contact the following office for data sheets, application notes and other download services from the Sony website.
http://www.sony-semicon.co.jp/business/base_en.html
We will collaborate with more AP makers to enhance customer satisfaction and will continue to expand the product lineup and fulfill the support organization so that we can offer ease of use with this product.
Application Engineer: Mr.Nomura , Mr.Sasaki , Mr.Kishimoto
0 notes
Photo



การติดตั้งและทดสอบ Raspberry Pi Camera Board
Raspberry Pi Camera Board เป็นโมดูลกล้องที่ออกแบบมาใช้งานร่วมกับบอร์ด Raspberry Pi โดยสามารถเชื่อมต่อกับซ๊อกเก็ต CAMERA บนบอร์ด ที่มีการเชื่อมต่อแบบ CSI bus โดยให้ทำการดึงซ๊อกเก็ต CAMERA แล้วเสียบสายเเพ เข้าไปดังรูป จากนั้นให้กดซ๊อกเก็ตของกล้องลงเพื่อทำการล๊อคสายสัญญาณ และที่สำคัญอย่าลืมดึงสติกเกอร์กันรอยออกด้วย ซึ่งการทดสอบ Raspberry pi camera board เบื้องต้น
เราจะทำการเชื่อมจ่ายไฟเข้าตัวบอร์ดเเละเชื่อมต่อ Internet เพื่อที่จะทำการอัพเดทข้อมูลโดยยใช้ sudo apt-get update และ sudo apt-get upgrade แล้วจึงทำการสั่ง sudo raspi-config เพื่อ enable ค่าของกล้อง ตลอดจนท้ายที่สุดทำการ Reboot ตัวบอร์ดใหม่อีกครั้ง และเข้าไปที่ TLX เพื่อทดสอบตัวกล้องด้วยคำสั่ง raspistill -o cam.jpg ก็จะได้ภาพที่ถ่ายจากกล้องขึ้นมาครับ และหากต้องการจะถ่ายภาพวิดิโอ raspivid -o video.h264 ทั้งนี้กล้องต้องการสำรองพลังงานอยู่ที่ power supply sufficient, The Camera Module adds about 200-250mA to the power requirements of your Raspberry Pi.
***ข้อควรระวัง**** เวลาเราอัพเกรดตัวกล้องหากพบ Error อาจจะเป็นเพราะเราเสียบกล้องไม่สนิท วิธีแก้ให้ปิดเครื่องและทำการเสียบสายให้แน่นเเล้วจึง ทำการอัพเดทอีกครั้ง
Switch Alternative Switch Description
-c --config โหลดไฟล์คอนฟิกเกอเรชั่น
-q --quiet ซ่อนข้อความยกเว้นข้อความที่แสดงความผิดพลาด Errors
-v --verbose แสดงข้อความเพิ่มเติมในขณะจับภาพ
--version แสดงเวอร์ชั่นและออกจากคำสั่ง
-l --loop รันแบบวนรอบ
-b --background รันอยู่เบื้องหลัง
-o --output สร้าง log file บันทึกการจับภาพ
-d --device เลือกแหล่งกล้องที่เชื่อมต่อ
-i --input <number/name> เลือก input สำหรับใช้งาน
-t --tuner เลือก tuner สำหรับใช้งาน
-f --frequency เลือความถี่ frequency สำหรับใช้งาน
-r --resolution ตั้งความละเอียดภาพ
--fps ตั้ง frame rate สำหรับการจับภาพ
-F --frames กำหนดจำนวนเฟรมเพื่อจับภาพ
-S --skip กำหนดจำนวนเฟรมเพื่อข้ามการจับภาพ
กำหนดจำนวนเฟรมเพื่อข้ามการจับภาพ
--dumpframe สร้างไฟล์ดิบ (raw frame)
-s --set = กำหนดค่าควบคุม
--revert เรียกคืนภาพต้นฉบับ
--flip พลิกกลับภาพในแนวนอนแนวตั้ง (h, v)
--crop [,] ตัดบางส่วนของภาพ
--scale ปรับสเกลรูปภาพ
--rotate หมุนรูปภาพตามมุม 90 องศาที่กำหนด
--deinterlace ลดข้อบกพร่องหรือการรบกวนบนภาพ
--invert สลับสีตรงกันข้าม
--greyscale ปรับภาพเป็นโทนสีเทา ระงับสีทั้งหมด
--swapchannels สลับช่อง c1 และ c2.
--no-banner ซ่อนแถบ Banner แสดงข้อมูล
--top-banner ซ่อนแถบ Banner ด้��นบนของภาพ
--bottom-banner ซ่อนแถบ Banner ด้านล่างของภาพ (Default)
--banner-colour กำหนดสี banner (#AARRGGBB)
--line-colour กำหนดสีเส้นขอบของ banner
--text-colour กำหนดสีของตัวอักษร
--font <[name][:size]> กำหนดฟอนท์และขนาด
--no-shadow ระงับโหมดแสดงเงาของตัวอักษร
--shadow เปิดโหมดแสดงเงาของตัวอักษร
--title กำหนดชื่อหัวเรื่อง (มุมบนด้านซ้าย)
--no-title ยกเลิกการกำหนดชื่อหัวเรื่อง
--subtitle กำหนดชื่อเรื่องย่อย (มุมล่างซ้าย)
--no-subtitle ยกเลิกการกำหนดชื่อเรื่องย่อย
--timestamp กำหนดรูปแบบวันเวลา (มุมบนขวา)
--no-timestamp ยกเลิกการกำหนดรูปแบบวันเวลา
--gmt ใช้เวลา GMT แทนเวลาท้องถิ่น local timezone.
--info กำหนดข้อมูลตัวอักษร (มุมล่างขวา)
--no-info ยกเลิกการกำหนดข้อมูลตัวอักษร
--underlay กำหนดรูปภาพอิมเมจที่นำมาวางซ้อนด้านล่าง
--no-underlay ยกเลิกการกำหนดรูปภาพอิมเมจที่นำมาวางซ้อนด้านล่าง
--overlay กำหนดรูปภาพอิมเมจที่นำมาวางซ้อนด้านบน
--no-overlay ยกเลิกการกำหนดรูปภาพอิมเมจที่นำมาวางซ้อนด้านบน
--jpeg เลือกฟอร์แมต JPEG (-1, 0 - 95)
--png เลือกฟอร์แมต PNG (-1, 0 - 10)
--save บันทึกการจับภาพลงไฟล์
--exec รันคำสั่งและรอจนกว่าคำสั่งจะทำงานเสร็จ
SETTING UP
See Camera Setup.
TROUBLESHOOTING
If the Camera Module isn't working correctly, there are number of things to try:
Is your power supply sufficient? The Camera Module adds about 200-250mA to the power requirements of your Raspberry Pi.
Is the ribbon cable attached to the Camera Serial Interface (CSI), not the Display Serial Interface (DSI)? The ribbon connector will fit into either port. The Camera port is located near the HDMI connector.
Are the ribbon connectors all firmly seated, and are they the right way round? They must be straight in their sockets.
Is the Camera Module connector, between the smaller black Camera Module itself and the PCB, firmly attached? Sometimes this connection can come loose during transit or when putting the Camera Module in a case. Using a fingernail, flip up the connector on the PCB, then reconnect it with gentle pressure. It engages with a very slight click. Don't force it; if it doesn't engage, it's probably slightly misaligned.
Have sudo apt-get update and sudo apt-get upgrade been run?
Has raspi-config been run and the Camera Module enabled?
If things are still not working, try the following:
If even a firmware update doesn't fix the problem, your Camera Module may be defective, and may need to be replaced.
Error : raspistill/raspivid command not found. This probably means your update/upgrade failed in some way. Try it again.
Error : ENOMEM. The Camera Module is not starting up. Check all connections again.
Error : ENOSPC. The Camera Module is probably running out of GPU memory. Check config.txt in the /boot/ folder. The gpu_mem option should be at least 128. Alternatively, use the Memory Split option in the Advanced section of raspi-config to set this.
If you've checked all the above issues and the Camera Module is still not working, you may need to upgrade the firmware on the Raspberry Pi. Use the following command to get the very latest (but experimental) firmware:
sudo rpi-update
COMMON COMMAND LINE OPTIONS
PREVIEW WINDOW
--preview, -p Preview window settings <'x,y,w,h'>
Allows the user to define the size of the preview window and its location on the screen. Note this will be superimposed over the top of any other windows/graphics.
--fullscreen, -f Fullscreen preview mode
Forces the preview window to use the whole screen. Note that the aspect ratio of the incoming image will be retained, so there may be bars on some edges.
--nopreview, -n Do not display a preview window
Disables the preview window completely. Note that even though the preview is disabled, the camera will still be producing frames, so will be using power.
--opacity, -op Set preview window opacity
Sets the opacity of the preview windows. 0 = invisible, 255 = fully opaque.
CAMERA CONTROL OPTIONS
--sharpness, -sh Set image sharpness (-100 - 100)
Sets the sharpness of the image. 0 is the default.
--contrast, -co Set image contrast (-100 - 100)
Sets the contrast of the image. 0 is the default.
--brightness, -br Set image brightness (0 - 100)
Sets the brightness of the image. 50 is the default. 0 is black, 100 is white.
--saturation, -sa Set image saturation (-100 - 100)
Sets the colour saturation of the image. 0 is the default.
--ISO, -ISO Set capture ISO (100 - 800)
Sets the ISO to be used for captures.
--vstab, -vs Turn on video stabilisation
In video mode only, turns on video stabilisation.
--ev, -ev Set EV compensation (-10 - 10)
Sets the EV compensation of the image. Default is 0.
--exposure, -ex Set exposure mode
Possible options are:
auto: use automatic exposure mode
night: select setting for night shooting
nightpreview:
backlight: select setting for backlit subject
spotlight:
sports: select setting for sports (fast shutter etc.)
snow: select setting optimised for snowy scenery
beach: select setting optimised for beach
verylong: select setting for long exposures
fixedfps: constrain fps to a fixed value
antishake: antishake mode
fireworks: select setting optimised for fireworks
Note that not all of these settings may be implemented, depending on camera tuning.
--awb, -awb Set Automatic White Balance (AWB) mode
Modes for which colour temperature ranges (K) are available have these settings in brackets.
off: turn off white balance calculation
auto: automatic mode (default)
sun: sunny mode (between 5000K and 6500K)
cloud: cloudy mode (between 6500K and 12000K)
shade: shade mode
tungsten: tungsten lighting mode (between 2500K and 3500K)
fluorescent: fluorescent lighting mode (between 2500K and 4500K)
incandescent: incandescent lighting mode
flash: flash mode
horizon: horizon mode
Note that not all of these settings may be implemented, depending on camera type.
--imxfx, -ifx Set image effect
Set an effect to be applied to the image:
none: no effect (default)
negative: invert the image colours
solarise: solarise the image
posterise: posterise the image
whiteboard: whiteboard effect
blackboard: blackboard effect
sketch: sketch effect
denoise: denoise the image
emboss: emboss the image
oilpaint: oil paint effect
hatch: hatch sketch effect
gpen: graphite sketch effect
pastel: pastel effect
watercolour: watercolour effect
film: film grain effect
blur: blur the image
saturation: colour saturate the image
colourswap: not fully implemented
washedout: not fully implemented
colourpoint: not fully implemented
colourbalance: not fully implemented
cartoon: not fully implemented
Note that not all of these settings may be available in all circumstances.
--colfx, -cfx Set colour effect <U:V>
The supplied U and V parameters (range 0 - 255) are applied to the U and Y channels of the image. For example, --colfx 128:128 should result in a monochrome image.
--metering, -mm Set metering mode
Specify the metering mode used for the preview and capture:
average: average the whole frame for metering
spot: spot metering
backlit: assume a backlit image
matrix: matrix metering
--rotation, -rot Set image rotation (0 - 359)
Sets the rotation of the image in the viewfinder and resulting image. This can take any value from 0 upwards, but due to hardware constraints only 0, 90, 180, and 270 degree rotations are supported.
--hflip, -hf Set horizontal flip
Flips the preview and saved image horizontally.
--vflip, -vf Set vertical flip
Flips the preview and saved image vertically.
--roi, -roi Set sensor region of interest
Allows the specification of the area of the sensor to be used as the source for the preview and capture. This is defined as x,y for the top-left corner, and a width and height, with all values in normalised coordinates (0.0 - 1.0). So, to set a ROI at halfway across and down the sensor, and a width and height of a quarter of the sensor, use:
-roi 0.5,0.5,0.25,0.25
--shutter, -ss Set shutter speed
Sets the shutter speed to the specified value (in microseconds). There's currently an upper limit of approximately 6000000us (6000ms, 6s), past which operation is undefined.
--drc, -drc Enable/disable dynamic range compression
DRC changes the images by increasing the range of dark areas, and decreasing the brighter areas. This can improve the image in low light areas.
off
low
med
high
By default, DRC is off.
--stats, -st Display image statistics
Displays the exposure, analogue and digital gains, and AWB settings used.
--awbgains, -awbg
Sets blue and red gains (as floating point numbers) to be applied when -awb -off is set e.g. -awbg 1.5,1.2
--mode, -md
Sets a specified sensor mode, disabling the automatic selection. Possible values depend on the version of the Camera Module being used:
Version 1.x (OV5647)
ModeSizeAspect RatioFrame ratesFOVBinning
0automatic selection
11920x108016:91-30fpsPartialNone
22592x19444:31-15fpsFullNone
32592x19444:30.1666-1fpsFullNone
41296x9724:31-42fpsFull2x2
51296x73016:91-49fpsFull2x2
6640x4804:342.1-60fpsFull2x2 plus skip
7640x4804:360.1-90fpsFull2x2 plus skip
Version 2.x (IMX219)
ModeSizeAspect RatioFrame ratesFOVBinning
0automatic selection
11920x108016:90.1-30fpsPartialNone
23280x24644:30.1-15fpsFullNone
33280x24644:30.1-15fpsFullNone
41640x12324:30.1-40fpsFull2x2
51640x92216:90.1-40fpsFull2x2
61280x72016:940-90fpsPartial2x2
7640x4804:340-90fpsPartial2x2
--camselect, -cs
Selects which camera to use on a multi-camera system. Use 0 or 1.
--annotate, -a Enable/set annotate flags or text
Adds some text and/or metadata to the picture.
Metadata is indicated using a bitmask notation, so add them together to show multiple parameters. For example, 12 will show time(4) and date(8), since 4+8=12.
Text may include date/time placeholders by using the '%' character, as used by strftime.
ValueMeaningExample Output
-a 4Time20:09:33
-a 8Date10/28/15
-a 124+8=12 Show the date(4) and time(8)20:09:33 10/28/15
-a 16Shutter Settings
-a 32CAF Settings
-a 64Gain Settings
-a 128Lens Settings
-a 256Motion Settings
-a 512Frame Number
-a 1024Black Background
-a "ABC %Y-%m-%d %X"Show some textABC %Y-%m-%d %X
-a 4 -a "ABC %Y-%m-%d %X"Show custom
formatted
date/timeABC 2015-10-28 20:09:33
-a 8 -a "ABC %Y-%m-%d %X"Show custom
formatted
date/timeABC 2015-10-28 20:09:33
--annotateex, -ae Set extra annotation parameters
Specifies annotation size, text colour, and background colour. Colours are in hex YUV format.
Size ranges from 6 - 160; default is 32. Asking for an invalid size should give you the default.
ExampleExplanation
-ae 32,0xff,0x808000 -a "Annotation text"gives size 32 white text on black background
-ae 10,0x00,0x8080FF -a "Annotation text"gives size 10 black text on white background
APPLICATION-SPECIFIC SETTINGS
RASPISTILL
--width, -w Set image width <size> --height, -h Set image height <size> --quality, -q Set JPEG quality <0 to 100>
Quality 100 is almost completely uncompressed. 75 is a good all-round value.
--raw, -r Add raw Bayer data to JPEG metadata
This option inserts the raw Bayer data from the camera into the JPEG metadata.
--output, -o Output filename <filename>
Specifies the output filename. If not specified, no file is saved. If the filename is '-', then all output is sent to stdout.
--latest, -l Link latest frame to filename <filename>
Makes a file system link under this name to the latest frame.
--verbose, -v Output verbose information during run
Outputs debugging/information messages during the program run.
--timeout, -t Time before the camera takes picture and shuts down
The program will run for this length of time, then take the capture (if output is specified). If not specified, this is set to 5 seconds.
--timelapse, -tl time-lapse mode
The specific value is the time between shots in milliseconds. Note that you should specify %04d at the point in the filename where you want a frame count number to appear. So, for example, the code below will produce a capture every 2 seconds, over a total period of 30s, named image0001.jpg, image0002.jpg and so on, through to image0015.jpg.
-t 30000 -tl 2000 -o image%04d.jpg
Note that the %04d indicates a 4-digit number, with leading zeroes added to make the required number of digits. So, for example, %08d would result in an 8-digit number.
If a time-lapse value of 0 is entered, the application will take pictures as fast as possible. Note that there's an minimum enforced pause of 30ms between captures to ensure that exposure calculations can be made.
--thumb, -th Set thumbnail parameters (x:y:quality)
Allows specification of the thumbnail image inserted into the JPEG file. If not specified, defaults are a size of 64x48 at quality 35.
if --thumb none is specified, no thumbnail information will be placed in the file. This reduces the file size slightly.
--demo, -d Run a demo mode <milliseconds>
This options cycles through the range of camera options. No capture is taken, and the demo will end at the end of the timeout period, irrespective of whether all the options have been cycled. The time between cycles should be specified as a millisecond value.
--encoding, -e Encoding to use for output file
Valid options are jpg, bmp, gif, and png. Note that unaccelerated image types (GIF, PNG, BMP) will take much longer to save than jpg, which is hardware accelerated. Also note that the filename suffix is completely ignored when deciding the encoding of a file.
--exif, -x EXIF tag to apply to captures (format as 'key=value')
Allows the insertion of specific EXIF tags into the JPEG image. You can have up to 32 EXIF tag entries. This is useful for tasks like adding GPS metadata. For example, to set the longitude:
--exif GPS.GPSLongitude=5/1,10/1,15/1
would set the longitude to 5 degs, 10 minutes, 15 seconds. See EXIF documentation for more details on the range of tags available; the supported tags are as follows:
IFD0.< or IFD1.< ImageWidth, ImageLength, BitsPerSample, Compression, PhotometricInterpretation, ImageDescription, Make, Model, StripOffsets, Orientation, SamplesPerPixel, RowsPerString, StripByteCounts, XResolution, YResolution, PlanarConfiguration, ResolutionUnit, TransferFunction, Software, DateTime, Artist, WhitePoint, PrimaryChromaticities, JPEGInterchangeFormat, JPEGInterchangeFormatLength, YCbCrCoefficients, YCbCrSubSampling, YCbCrPositioning, ReferenceBlackWhite, Copyright> EXIF.< ExposureTime, FNumber, ExposureProgram, SpectralSensitivity, ISOSpeedRatings, OECF, ExifVersion, DateTimeOriginal, DateTimeDigitized, ComponentsConfiguration, CompressedBitsPerPixel, ShutterSpeedValue, ApertureValue, BrightnessValue, ExposureBiasValue, MaxApertureValue, SubjectDistance, MeteringMode, LightSource, Flash, FocalLength, SubjectArea, MakerNote, UserComment, SubSecTime, SubSecTimeOriginal, SubSecTimeDigitized, FlashpixVersion, ColorSpace, PixelXDimension, PixelYDimension, RelatedSoundFile, FlashEnergy, SpatialFrequencyResponse, FocalPlaneXResolution, FocalPlaneYResolution, FocalPlaneResolutionUnit, SubjectLocation, ExposureIndex, SensingMethod, FileSource, SceneType, CFAPattern, CustomRendered, ExposureMode, WhiteBalance, DigitalZoomRatio, FocalLengthIn35mmFilm, SceneCaptureType, GainControl, Contrast, Saturation, Sharpness, DeviceSettingDescription, SubjectDistanceRange, ImageUniqueID> GPS.< GPSVersionID, GPSLatitudeRef, GPSLatitude, GPSLongitudeRef, GPSLongitude, GPSAltitudeRef, GPSAltitude, GPSTimeStamp, GPSSatellites, GPSStatus, GPSMeasureMode, GPSDOP, GPSSpeedRef, GPSSpeed, GPSTrackRef, GPSTrack, GPSImgDirectionRef, GPSImgDirection, GPSMapDatum, GPSDestLatitudeRef, GPSDestLatitude, GPSDestLongitudeRef, GPSDestLongitude, GPSDestBearingRef, GPSDestBearing, GPSDestDistanceRef, GPSDestDistance, GPSProcessingMethod, GPSAreaInformation, GPSDateStamp, GPSDifferential> EINT.< InteroperabilityIndex, InteroperabilityVersion, RelatedImageFileFormat, RelatedImageWidth, RelatedImageLength>
Note that a small subset of these tags will be set automatically by the camera system, but will be overridden by any EXIF options on the command line.
Setting --exif none will prevent any EXIF information being stored in the file. This reduces the file size slightly.
--fullpreview, -fp Full preview mode
This runs the preview window using the full resolution capture mode. Maximum frames per second in this mode is 15fps, and the preview will have the same field of view as the capture. Captures should happen more quickly, as no mode change should be required. This feature is currently under development.
--keypress, -k Keypress mode
The camera is run for the requested time (-t), and a capture can be initiated throughout that time by pressing the Enter key. Pressing X then Enter will exit the application before the timeout is reached. If the timeout is set to 0, the camera will run indefinitely until the user presses X then Enter. Using the verbose option (-v) will display a prompt asking for user input, otherwise no prompt is displayed.
--signal, -s Signal mode
The camera is run for the requested time (-t), and a capture can be initiated throughout that time by sending a USR1 signal to the camera process. This can be done using the kill command. You can find the camera process ID using the pgrep raspistill command.
kill -USR1 <process id of raspistill>
RASPISTILLYUV
Many of the options for raspistillyuv are the same as those for raspistill. This section shows the differences.
Unsupported options:
--exif, --encoding, --thumb, --raw, --quality
Extra options :
--rgb, -rgb Save uncompressed data as RGB888
This option forces the image to be saved as RGB data with 8 bits per channel, rather than YUV420.
Note that the image buffers saved in raspistillyuv are padded to a horizontal size divisible by 32, so there may be unused bytes at the end of each line. Buffers are also padded vertically to be divisible by 16, and in the YUV mode, each plane of Y,U,V is padded in this way.
RASPIVID
--width, -w Set image width <size>
Width of resulting video. This should be between 64 and 1920.
--height, -h Set image height <size>
Height of resulting video. This should be between 64 and 1080.
--bitrate, -b Set bitrate
Use bits per second, so 10Mbits/s would be -b 10000000. For H264, 1080p30 a high quality bitrate would be 15Mbits/s or more. Maximum bitrate is 25Mbits/s (-b 25000000), but much over 17Mbits/s won't show noticeable improvement at 1080p30.
--output, -o Output filename <filename>
Specify the output filename. If not specified, no file is saved. If the filename is '-', then all output is sent to stdout.
--verbose, -v Output verbose information during run
Outputs debugging/information messages during the program run.
--timeout, -t Time before the camera takes picture and shuts down
The program will run for this length of time, then take the capture (if output is specified). If not specified, this is set to 5 seconds. Setting 0 will mean the application will run continuously until stopped with Ctrl-C.
--demo, -d Run a demo mode <milliseconds>
This options cycles through the range of camera options. No capture is done, and the demo will end at the end of the timeout period, irrespective of whether all the options have been cycled. The time between cycles should be specified as a millisecond value.
--framerate, -fps Specify the frames per second to record
At present, the minimum frame rate allowed is 2fps, and the maximum is 30fps. This is likely to change in the future.
--penc, -e Display preview image after encoding
Switch on an option to display the preview after compression. This will show any compression artefacts in the preview window. In normal operation, the preview will show the camera output prior to being compressed. This option is not guaranteed to work in future releases.
--intra, -g Specify the intra refresh period (key frame rate/GoP)
Sets the intra refresh period (GoP) rate for the recorded video. H264 video uses a complete frame (I-frame) every intra refresh period, from which subsequent frames are based. This option specifies the number of frames between each I-frame. Larger numbers here will reduce the size of the resulting video, and smaller numbers make the stream less error-prone.
--qp, -qp Set quantisation parameter
Sets the initial quantisation parameter for the stream. Varies from approximately 10 to 40, and will greatly affect the quality of the recording. Higher values reduce quality and decrease file size. Combine this setting with a bitrate of 0 to set a completely variable bitrate.
--profile, -pf Specify H264 profile to use for encoding
Sets the H264 profile to be used for the encoding. Options are:
baseline
main
high
--inline, -ih Insert PPS, SPS headers
Forces the stream to include PPS and SPS headers on every I-frame. Needed for certain streaming cases e.g. Apple HLS. These headers are small, so don't greatly increase the file size.
--timed, -td Do timed switches between capture and pause
This options allows the video capture to be paused and restarted at particular time intervals. Two values are required: the on time and the off time. On time is the amount of time the video is captured, and off time is the amount it is paused. The total time of the recording is defined by the timeout option. Note that the recording may take slightly over the timeout setting depending on the on and off times.
For example:
raspivid -o test.h264 -t 25000 -timed 2500,5000
will record for a period of 25 seconds. The recording will be over a timeframe consisting of 2500ms (2.5s) segments with 5000ms (5s) gaps, repeating over the 20s. So the entire recording will actually be only 10s long, since 4 segments of 2.5s = 10s separated by 5s gaps. So:
2.5 record – 5 pause - 2.5 record – 5 pause - 2.5 record – 5 pause – 2.5 record
gives a total recording period of 25s, but only 10s of actual recorded footage.
--keypress, -k Toggle between record and pause on Enter keypress
On each press of the Enter key, the recording will be paused or restarted. Pressing X then Enter will stop recording and close the application. Note that the timeout value will be used to signal the end of recording, but is only checked after each Enter keypress; so if the system is waiting for a keypress, even if the timeout has expired, it will still wait for the keypress before exiting.
--signal, -s Toggle between record and pause according to SIGUSR1
Sending a USR1 signal to the raspivid process will toggle between recording and paused. This can be done using the kill command, as below. You can find the raspivid process ID using pgrep raspivid.
kill -USR1 <process id of raspivid>
Note that the timeout value will be used to indicate the end of recording, but is only checked after each receipt of the SIGUSR1 signal; so if the system is waiting for a signal, even if the timeout has expired, it will still wait for the signal before exiting.
--initial, -i Define initial state on startup
Define whether the camera will start paused or will immediately start recording. Options are record or pause. Note that if you are using a simple timeout, and initial is set to pause, no output will be recorded.
--segment, -sg Segment the stream into multiple files
Rather than creating a single file, the file is split into segments of approximately the numer of milliseconds specified. In order to provide different filenames, you should add %04d or similar at the point in the filename where you want a segment count number to appear e.g:
--segment 3000 -o video%04d.h264
will produce video clips of approximately 3000ms (3s) long, named video0001.h264, video0002.h264 etc. The clips should be seamless (no frame drops between clips), but the accuracy of each clip length will depend on the intraframe period, as the segments will always start on an I-frame. They will therefore always be equal or longer to the specified period.
--wrap, -wr Set the maximum value for segment number
When outputting segments, this is the maximum the segment number can reach before it's reset to 1, giving the ability to keep recording segments, but overwriting the oldest one. So if set to 4, in the segment example above, the files produced will be video0001.h264, video0002.h264, video0003.h264, and video0004.h264. Once video0004.h264 is recorded, the count will reset to 1, and video0001.h264 will be overwritten.
--start, -sn Set the initial segment number
When outputting segments, this is the initial segment number, giving the ability to resume a previous recording from a given segment. The default value is 1.
EXAMPLES
STILL CAPTURES
By default, captures are done at the highest resolution supported by the sensor. This can be changed using the -w and -h command line options.
Take a default capture after 2s (times are specified in milliseconds) on the viewfinder, saving in image.jpg:
raspistill -t 2000 -o image.jpg
Take a capture at a different resolution:
raspistill -t 2000 -o image.jpg -w 640 -h 480
Reduce the quality considerably to reduce file size:
raspistill -t 2000 -o image.jpg -q 5
Force the preview to appear at coordinate 100,100, with width 300 pixels and height 200 pixels:
raspistill -t 2000 -o image.jpg -p 100,100,300,200
Disable preview entirely:
raspistill -t 2000 -o image.jpg -n
Save the image as a PNG file (lossless compression, but slower than JPEG). Note that the filename suffix is ignored when choosing the image encoding:
raspistill -t 2000 -o image.png –e png
Add some EXIF information to the JPEG. This sets the Artist tag name to Boris, and the GPS altitude to 123.5m. Note that if setting GPS tags you should set as a minimum GPSLatitude, GPSLatitudeRef, GPSLongitude, GPSLongitudeRef, GPSAltitude, and GPSAltitudeRef:
raspistill -t 2000 -o image.jpg -x IFD0.Artist=Boris -x GPS.GPSAltitude=1235/10
Set an emboss image effect:
raspistill -t 2000 -o image.jpg -ifx emboss
Set the U and V channels of the YUV image to specific values (128:128 produces a greyscale image):
raspistill -t 2000 -o image.jpg -cfx 128:128
Run preview for 2s, with no saved image:
raspistill -t 2000
Take a time-lapse picture, every 10 seconds for 10 minutes (10 minutes = 600000ms), naming the files image_num_001_today.jpg, image_num_002_today.jpg and so on, with the latest picture also available under the name latest.jpg:
raspistill -t 600000 -tl 10000 -o image_num_%03d_today.jpg -l latest.jpg
Take a picture and send the image data to stdout:
raspistill -t 2000 -o -
Take a picture and send the image data to a file:
raspistill -t 2000 -o - > my_file.jpg
Run the camera forever, taking a picture when Enter is pressed:
raspistill -t 0 -k -o my_pics%02d.jpg
VIDEO CAPTURES
Image size and preview settings are the same as for stills capture. Default size for video recording is 1080p (1920x1080).
Record a 5s clip with default settings (1080p30):
raspivid -t 5000 -o video.h264
Record a 5s clip at a specified bitrate (3.5Mbits/s):
raspivid -t 5000 -o video.h264 -b 3500000
Record a 5s clip at a specified framerate (5fps):
raspivid -t 5000 -o video.h264 -f 5
Encode a 5s camera stream and send the image data to stdout:
raspivid -t 5000 -o -
Encode a 5s camera stream and send the image data to a file:
raspivid -t 5000 -o - > my_file.h264
SHELL ERROR CODES
The applications described here will return a standard error code to the shell on completion. Possible error codes are:
C DefineCodeDescription
EX_OK0Application ran successfully
EX_USAGE64Bad command line parameter
EX_SOFTWARE70Software or camera error
130Application terminated by Ctrl-C
0 notes
Photo

การ Remote เข้าใช้งาน SSH Command Line (Terminal) และการ Remote ผ่านหน้าต่าง Windows
*****การหา IP ของ Board ให้เราเข้าไปยัง TLX เเล้ว Command ในคำสั่ง ipconfig ลงมาล่างสุดก็จะได้ IP Add******
1.***สามารถ Down load โปรแกรม Putty ได้ที่ www.greenend.org.uk แล้วเลือกที่ PuTTY (ฟรี)+ทำการติดตั้งให้เรียบร้อย****
เราจำเป็นที่จะต้อง Donwload โปรแกรม Putty เข้ามาเเละทำการพิมพ์คำสั่ง TLX ด้วย sudo raspi-config เเล้วไปที่ interface option เลือกคำสั่ง SSH เพื่อปลดให้ enable ก็จะสามารถเชื่อมต่อกับ Command ได้
2.การ Remote ผ่านทาง Windows
โดยเราจะทำการ Command ด้วยการติดตั้งหรือพิมพ์คำสั่ง sudo apt-get install xrdp แล้วกด Enter จากนั้นมันจะถามว่าเราต้องการทำงานต่อไหม? ให้กด Y เพื่อทำการ Upgrade โปรแกรม
ตัดภาพมาที่โน๊ตบุคของเราให้เข้าไปที่ run บนระบบปฎิบัติการ windows ซึ่งอาจใช้ คีย์ลัด windows+R เเล้วพิมพ์คำว่า mstsc แล้วทำการใส่ ID pi เเละ Password raspberry ไม่มีpi ในการ log-in เพียงเท่านี้ก็ จะสามารถควบคุมเเละสั่งคำสั่งได้ (ทั้งนี้ความไวในการควบคุมขึ้นอยู๋กับความเร็วของ อินเตอร์เนต)
0 notes
Photo



หลังจากนั้นทำการติดตั้งอุปกรณ์ เสียบอุปกรณ์ให้พร้อมและเสียบ Micro SD ที่เราลงโปรแกรมมา จะพบว่า ตัวหน้าจอคอมจะบูธเข้าเครื่องสู่โหมด Rasbain เป็นที่เรียบร้อย ทั้งนี้ซึ่งเป็นจุดเด่นอีกข้อหนึ่งที่ ตัวบอร์ด Raspberry pi 3 คือบอร์ดตัวนี้มีจุดที่น่าสนใจในการรับสัญญาณ Wifi ซึ่งเหนือกว่า RPI บอร์ดเวอร์ชั่นก่อน เเละคอมพิวเตอร์จิ๋ว RPI เทียบเท่าคอมพิวเตอร์ Laptop มากขึ้นเรื่อยๆ โดยเราสามารถเชื่อมต่อ Wifi ได้ด้วยการกด icon wifi และทำการ login ปกติ จากนั้นเข้าไปที่คำสั่งคอมมาน ด้วยคำสั่ง sudo apt-get update ซึ่งค่อนข้างใช้เวลาพอสมควร และตอบ Y เพื่อตอบตกรงว่ายอมรับการ upgrade โดยเวลาที่ใช้ในการอัพเดท อยู่ที่ประมาณ 20 นาทีก่อนที่จะกด q เพื่อเข้าโหมด configuring rpi-chrominum-mode เพื่อแจ้งถึงโปรแกรมที่มีการอัพเกรดให้เลือกที่ ok เเล้วกด Enter ในลำดับถัดมา
เเละการตั้งค่าเบื้องต้นให้เราเข้าไปที่ TLX โดยคอมมานว่า sudo raspi-config และเข้าไปที่ advance option และ ไปที่ expand filesystem เพื่อให้เราเห็นหน่วยความจำทั้งหมดที่เราใช้และจากนั้นทำการตั้งเวลาให้เข้าไปที่ Localisation option เเละเปลี่ยนไปที่ time zone เลือก aisa และ bangkok จากนี้เวลาจะอัพเดทเป็นที่เรียบร้อย
จากนั้นจะทำการ setting ค่าของ keybord โดยให้เราเข้าไปที่ TLX และพิมพ์
sudo nano /etc/default/keyborad ไม่อย่างนั้นเวลาเรา codding program เราจะมีปัญหาเรื่องของ / และตัว # ซึ่งนาโนในที่นี้เราสามารถเข้าไปแก้ไฟล์และตัวโปรแกรมของเราได้
จากนั้นไปที่ XKBLAOUT ให้เปลี่ยนจาก”gb” เป็น us เเเล้วให้ ctrl+o และ enter ก่อนที่จะctrl+x ก่อนออกมา
0 notes
Photo

การติดตั้งระบบปฎิบัติการ Raspbian บน SD Card
ควรมีขนาด 8 GB ขึ้นไปโดยทำการเปิดโปรแกรม win32 Disk imger พร้อมกับเลือกไฟล์ที่เราได้เลือกไว้ก่อนหน้าและตัวไดร์ฟของ micro sd กด write คอมจะถามเราว่าจะเขียนหรือให้ให้ตอบตกรง และรอจนติดตั้งระบบปฎิบัติการ Raspbian บน SD Card จนกว่าจะครบ 100% จึงเป็นอันติดตั้งเสร็จสมบูรณ์
0 notes
Photo
การติดตั้งระบบปฎิบัติการสำหรับ Raspberry pi ด้วย Micro SD Card
ซึ่งความจำที่ได้ต้องไม่น้อยกว่า 8 GB ซึ่งระบบปฎิบัติการที่ใช้จะใช้เป็นระบบ Linux ซึ่งเป็น Raspbian โดยจำเป็นจะต้องใช้โปรแกรม Win32 Disk Imager โดยเข้าไป Download ฟรีได้ที่ https://sourceforge.net/projects/win32diskimager/files/Archive/
จากนั้นทำการติดตั้งเมื่อติดตั้งเสร็จให้ Download ระบบปฎิบัติการ Rasbian ในเว็ปของ www.raspberrypi.org เข้าไปที่ download มองหาระบบปฎิบัติการ Rasbian ตามรายละเอียดข้างต้น
Raspbian is the Foundation’s official supported operating system. You can install it with NOOBS or download the image below and follow our installation guide.
Raspbian comes pre-installed with plenty of software for education, programming and general use. It has Python, Scratch, Sonic Pi, Java, Mathematica and more.
The Raspbian with Desktop image contained in the ZIP archive is over 4GB in size, which means that these archives use features which are not supported by older unzip tools on some platforms. If you find that the download appears to be corrupt or the file is not unzipping correctly, please try using 7Zip (Windows) or The Unarchiver (Macintosh). Both are free of charge and have been tested to unzip the image correctly.
โดยเลือก Raspbian stretch with desktop และเมื่อ down loadเสร็จแล้วให้ทำการแตกไฟล์ที่ได้เพียงเท่านี้เราก็พร้อมแล้วที่จะทำการติดตั้งระบบ Raspbian โดยโปรแกรม Win32 Disk Imager ***** หากไฟล์ที่เราDownload มาเป็น ISO ให้เปลี่ยนเป็น img ก่อนจะทำการเขียนข้อมูล****
0 notes
Photo

อุปกรณ์ที่ใช้
The Raspberry Pi 3 is the third-generation Raspberry Pi. It replaced the Raspberry Pi 2 Model B in February 2016.
Quad Core 1.2GHz Broadcom BCM2837 64bit CPU
1GB RAM
BCM43438 wireless LAN and Bluetooth Low Energy (BLE) on board
40-pin extended GPIO
4 USB 2 ports
4 Pole stereo output and composite video port
Full size HDMI
CSI camera port for connecting a Raspberry Pi camera
DSI display port for connecting a Raspberry Pi touchscreen display
Micro SD port for loading your operating system and storing data
Upgraded switched Micro USB power source up to 2.5A
และสเปคกล้องใช้งาน
The Raspberry Pi Camera Module v2 replaced the original Camera Module in April 2016. The v2 Camera Module has a Sony IMX219 8-megapixel sensor (compared to the 5-megapixel OmniVision OV5647 sensor of the original camera).
The Camera Module can be used to take high-definition video, as well as stills photographs. It’s easy to use for beginners, but has plenty to offer advanced users if you’re looking to expand your knowledge. There are lots of examples online of people using it for time-lapse, slow-motion, and other video cleverness. You can also use the libraries we bundle with the camera to create effects.
You can read all the gory details about IMX219 and the Exmor R back-illuminated sensor architecture on Sony’s website, but suffice to say this is more than just a resolution upgrade: it’s a leap forward in image quality, colour fidelity, and low-light performance. It supports 1080p30, 720p60 and VGA90 video modes, as well as still capture. It attaches via a 15cm ribbon cable to the CSI port on the Raspberry Pi.
The camera works with all models of Raspberry Pi 1, 2, and 3. It can be accessed through the MMAL and V4L APIs, and there are numerous third-party libraries built for it, including the Picamera Python library. See the Getting Started with Picamera resource to learn how to use it.
The camera module is very popular in home security applications, and in wildlife camera traps.
0 notes
Photo

ทำการประกอบ Raspberry pi V3 จะมีสติกเกอร์เล็กๆ ให้เราดึงออกมา เวลาจะใช้งานตัวกล้องให้ดึงออกมาเเละเสียบสายเเพกล้องอย่างระมัดระวัง ซึ่งไฟตัวนี้จะจ่ายอยู่ทีี่ 5 V 2Amp แนะนำให้ใช้กับตัว Changer ของบริษัทเขา ไม่เเนะนำให้ใช้ power bank ซึ่ง Changer ตัวนี้เขาออกแบบมาให้กำลังไฟเกินละคำนวณพอดี และตัวบอร์ดตัวนี้เหมือนกับอุปกรณ์ไฟฟ้าตัวหนึ่งควรใช้งานอย่างระมัดระวัง
0 notes
Photo

จุดเริ่มต้นของงานในวันนี้เริ่มจากอุปกรณ์การทำ Computer vision ทั้งนี้อุปกรณ์ประกอบไปด้วย
-Raspberry Pi camara
- Raspberry Pi 3 Model B 1GB Q'ty 1 pcs
- Sandisk MicroSD Ultra 16GB Class10 48MB/s (No Adaptor) Q'ty 1 pcs
- Raspberry Pi Acrylic case (Model RPi3) Q'ty 1 pcs - GPIO Ribbon Cable for Raspberry Pi Model B+ (40 pins) Q'ty 1 pcs - Official Wall Adapter Power Supply - 5.1V DC 2.5A (USB Micro-B) Q'ty 1 pcs - HDMI Cable - 6" Q'ty 1 pcs - 830 point White BreadBoard (ProtoBoard) Q'ty 1 pcs - GPIO Extension Board for Raspberry Pi B+ Q'ty 1 pcs - Heat Sink for Raspberry Pi 3 Q'ty 1 pcs
- Stacking Header for Raspberry Pi B+ 2x20 Extra Tall Header Q'ty 1 pcs
- Female to Female Cable 40 Pins Q'ty 1 pcs - Male to Male Cable 40 Pins Q'ty 1 pcs
เเละอุปกรณ์รวมอื่นๆอีก
0 notes