티스토리 뷰
2018/05/06 - [컴퓨터/컴퓨터 상식] - 라즈베리파이 카메라 제어 이미지 효과
2018/05/06 - [컴퓨터/컴퓨터 상식] - 라즈베리파이 카메라 제어
2018/05/06 - [컴퓨터/컴퓨터 상식] - 라즈베리파이 카메라 타임랩스 만들기
2018/05/06 - [컴퓨터/컴퓨터 상식] - 라즈베리파이 카메라 비디오 촬영하기
라즈베리파이 카메라 활성화하기
1. 라즈베리파이에 카메라를 연결한다.
2. $ sudo raspi-config
Raspberry Pi Software Configuration Tool(raspi-config)
\
5. Interfacing Options(인터페이싱 옵션)를 선택한다.
카메라를 선택한다.
예를 선택한다.
enabled 확인한다.
Finish 버튼을 누른다.
리부팅 <예>를 누른다.
카메라 촬영하기
$ sudo raspistill -o cam.jpg
5초 후 사진을 찍는다. (타이머 기본값 5초)
카메라가 실행되고 5초뒤 종료된다.
기본폴더 /home/pi/cam.jpg 이미지 파일이 생성된다.
타이머 변경
타이머 기본값은 5초. 옵션은 t , 단위는 밀리초
타이머를 1초로 설정
$ raspistill -t 1000 -o cam.jpg
키기 변경
옵션 w(넓이), h(높이)
$ raspistill -w 200 -h 200 -0 cam.jpg
밝기 조절
옵션 br
밝기를 50%로 설정할때
$ raspistill -br 50 -o cam-br-50.jpg
화면 뒤집기
옵션 hf(수평) vf(수직)
수평 뒤집기
$ raspistill -hf -o camhf.jpg
더 많은 옵션 보기
$ raspistill -?
pi@raspberrypi:~ $ raspistill -?
Runs camera for specific time, and take JPG capture at end if requested
usage: raspistill [options]
Image parameter commands
-?, --help : This help information
-w, --width : Set image width <size>
-h, --height : Set image height <size>
-q, --quality : Set jpeg quality <0 to 100>
-r, --raw : Add raw bayer data to jpeg metadata
-o, --output : Output filename <filename> (to write to stdout, use '-o -'). If not specified, no file is saved
-l, --latest : Link latest complete image to filename <filename>
-v, --verbose : Output verbose information during run
-t, --timeout : Time (in ms) before takes picture and shuts down (if not specified, set to 5s)
-th, --thumb : Set thumbnail parameters (x:y:quality) or none
-d, --demo : Run a demo mode (cycle through range of camera options, no capture)
-e, --encoding : Encoding to use for output file (jpg, bmp, gif, png)
-x, --exif : EXIF tag to apply to captures (format as 'key=value') or none
-tl, --timelapse : Timelapse mode. Takes a picture every <t>ms. %d == frame number (Try: -o img_%04d.jpg)
-fp, --fullpreview : Run the preview using the still capture resolution (may reduce preview fps)
-k, --keypress : Wait between captures for a ENTER, X then ENTER to exit
-s, --signal : Wait between captures for a SIGUSR1 or SIGUSR2 from another process
-g, --gl : Draw preview to texture instead of using video render component
-gc, --glcapture : Capture the GL frame-buffer instead of the camera image
-set, --settings : Retrieve camera settings and write to stdout
-cs, --camselect : Select camera <number>. Default 0
-bm, --burst : Enable 'burst capture mode'
-md, --mode : Force sensor mode. 0=auto. See docs for other modes available
-dt, --datetime : Replace output pattern (%d) with DateTime (MonthDayHourMinSec)
-ts, --timestamp : Replace output pattern (%d) with unix timestamp (seconds since 1970)
-fs, --framestart : Starting frame number in output pattern(%d)
-rs, --restart : JPEG Restart interval (default of 0 for none)
Preview parameter commands
-p, --preview : Preview window settings <'x,y,w,h'>
-f, --fullscreen : Fullscreen preview mode
-op, --opacity : Preview window opacity (0-255)
-n, --nopreview : Do not display a preview window
Image parameter commands
-sh, --sharpness : Set image sharpness (-100 to 100)
-co, --contrast : Set image contrast (-100 to 100)
-br, --brightness : Set image brightness (0 to 100)
-sa, --saturation : Set image saturation (-100 to 100)
-ISO, --ISO : Set capture ISO
-vs, --vstab : Turn on video stabilisation
-ev, --ev : Set EV compensation - steps of 1/6 stop
-ex, --exposure : Set exposure mode (see Notes)
-fli, --flicker : Set flicker avoid mode (see Notes)
-awb, --awb : Set AWB mode (see Notes)
-ifx, --imxfx : Set image effect (see Notes)
-cfx, --colfx : Set colour effect (U:V)
-mm, --metering : Set metering mode (see Notes)
-rot, --rotation : Set image rotation (0-359)
-hf, --hflip : Set horizontal flip
-vf, --vflip : Set vertical flip
-roi, --roi : Set region of interest (x,y,w,d as normalised coordinates [0.0-1.0])
-ss, --shutter : Set shutter speed in microseconds
-awbg, --awbgains : Set AWB gains - AWB mode must be off
-drc, --drc : Set DRC Level (see Notes)
-st, --stats : Force recomputation of statistics on stills capture pass
-a, --annotate : Enable/Set annotate flags or text
-3d, --stereo : Select stereoscopic mode
-dec, --decimate : Half width/height of stereo image
-3dswap, --3dswap : Swap camera order for stereoscopic
-ae, --annotateex : Set extra annotation parameters (text size, text colour(hex YUV), bg colour(hex YUV))
-ag, --analoggain : Set the analog gain (floating point)
-dg, --digitalgain : Set the digital gain (floating point)
Notes
Exposure mode options :
off,auto,night,nightpreview,backlight,spotlight,sports,snow,beach,verylong,fixedfps,antishake,fireworks
Flicker avoid mode options :
off,auto,50hz,60hz
AWB mode options :
off,auto,sun,cloud,shade,tungsten,fluorescent,incandescent,flash,horizon
Image Effect mode options :
none,negative,solarise,sketch,denoise,emboss,oilpaint,hatch,gpen,pastel,watercolour,film,blur,saturation,colourswap,washedout,posterise,colourpoint,colourbalance,cartoon
Metering Mode options :
average,spot,backlit,matrix
Dynamic Range Compression (DRC) options :
off,low,med,high
Preview parameter commands
-gs, --glscene : GL scene square,teapot,mirror,yuv,sobel,vcsm_square
-gw, --glwin : GL window settings <'x,y,w,h'>
'프로그래밍 > 라즈베리파이 & Qt' 카테고리의 다른 글
라즈베리파이 카메라 비디오 촬영하기 (0) | 2018.05.06 |
---|---|
라즈베리파이 Bash 스크립트 만들기 (0) | 2018.05.06 |
라즈베리파이 띄어쓰기 문제 (0) | 2018.05.06 |
라즈베리파이 암호 바꾸기 (0) | 2018.05.06 |
라즈베리파이3에서 캡쳐하기 (0) | 2018.05.06 |