import numpy as np def hist_match ( source , template ): """ Adjust the pixel values of a grayscale image such that its histogram matches that of a target image Arguments: ----------- source: np.ndarray Image to transform; the histogram is computed over the flattened array template: np.ndarray Template image; can have different dimensions to source Returns: ----------- matched: np.ndarray The transformed output image """ oldshape = source . shape source = source . ravel () template = template . ravel () # get the set of unique pixel values and their corresponding indices and # counts s_values , bin_idx , s_counts = np . unique ( source , return_inverse = True , return_counts = True ) t_values , t_counts = np . unique ( template , return_counts = True ) ...
Raspberry Pi를 설치하는 방법을 알아본다.
답글삭제여기서는 여러가지 부팅 이미지가 있지만 ubuntu 리눅스에 익숙한 debian 계열의
Raspbian 이미지를 사용한다.
> 작업 환경 : Mac OSX 10.9
> Raspberry Pi 다운로드 사이트 링크 : http://www.raspberrypi.org/downloads
1470208
Raspberry Pi에서 OS 설치 사용은 크게 두가지이다.
첫째, Pi에서 NOOBS(New Out Of Box Software)를 SD 카드에 복사하여 사용하는
방법으로 간편하지만 이미지 용량이 2G정도의 큰 사이즈를 갖는다.
둘째, Raw Image를 직접 다운로드하여 설치할 수 있다. 이미지 용량은 500Mb정도이다.
설치방법은 Unix계열은 dd, 원도우 계열은 Win32DiskImager를 사용 할 수 있다.
여기서는 두번째 방법으로 하였습니다.
1. 다운로드 사이트에서 사용할 Raw Image를 다운로드 한다.
* 여기서는 Raspbian(2013-09-25-wheezy-raspbian.zip)을 사용 함.
2. 다운로드 된 압축 파일을 푼다.
3. SD 카드를 Macbook에 끼운다.
4. diskutil명령으로 SD 디바이스 경로를 확인한다.
$diskutil list
* 출력된 리스트를 보면 /dev/disk@이 보인다. 현재 디바이스 경로는 /dev/disk1이다.
5. $sudo diskutil unmountDisk /dev/disk1
6. $sudo dd bs=1m if=~/Desktop/2013-09-25-wheezy-raspbian.img of=/dev/disk1
* 명령 실행 후 수분을 기다리면 끝이난다.
7. $sudo diskutil eject /dev/disk1
4번~7번 단계를 간단히 하려면 아래의 파일을 다운로하여 압축 푼 후 Raspbian이미지파일을
아래의 폴더에 이동하여 install을 실행하면 간단하게 이미지를 복사할 수 있다.
Raspberry-PI-SD-Installer-OS-X-master.zip
> SD카트를 Pi보드에 끼우고 전원을 연결하면 부팅이 시작된다.
설치 후 처음 부팅을 하게되면 아래와 같이 Rasp-config 화면이 표시되고 기본 설정을 한 후 "Finish"하면
정상 부팅이 된다.
1441476
부팅이 완료되면 다음과 같이 산딸기 그림이 한 화면에 가득차게 표시된다.
480338
이제 부터 즐겁게 라즈베리파이를 탐험하면된다.
이상 간단한 Start입니다.