2020년 9월 25일 금요일

colour-demosaic python package

to execute demosaic example 

1. Find a proper source

    - Colour - Demosaicing 

        - Colour Science library install

            - when install modify setup.py (long_description = open('README.rst', encoding='UTF8').read())

        - pip install colour-demosaicing

2. example

    - in "colour-demosaicing" package

    - python folder\Lib\site-packages\colour_demosaicing\examples\examples_bayer.ipynb

    - add extention when read image -> colour.io.read_image(temp_path, format ='exr')

    - install freeimage binary


**1

this post give me the clue about reading image error

error message: Could not find a format to read the specified file in single-image mode

https://stackoverflow.com/questions/60713874/grayscale-image-not-a-jpeg

2020년 7월 23일 목요일

C++ 의 List와 Vector의 차이

https://thispointer.com/difference-between-vector-and-list-in-c/

이 문서는 C++의 std::vector 와 std::list의 다른 점에 대하여 논의할 것이다.

Vector와 List는 C++에서 Sequential한 Container이다.
Standard Template Library 이다.
이 두 Container의 내부 구현은 다른점이 많다.

List는 연속적이지 않은 Memory 장소에 각 요소들을 저장하고 있다. 다른말로 하면 double linked list로 구현이 되어 있다.

반면에 Vector는 각 요소들을 연속적인 Memory 장소에 저장하고 있다.

std::vector vs std::list
1.) Insertion and Deletion
List는 Vector에 비하여 삽입과 삭제가 효율적이다. 앞, 뒤, 중간 어디에서 작업을 하던지 몇개의 pointer만을 바꿔주면 되기 때문이다.

반면에 Vector는 앞이나 중간에 삽입이나 삭제를 하면 전체 요소들이 전부 이동을 해야 한다. 새로운 장소를 찾아야 하고 모든 값들이 복사되어야 한다.

2.) Random Access:
List가 내부적으로 Double Linked List로 구현되어 있기 때문에, random access 는 허용되지 않는다. 예를 들어 15번째 요소에 접근하려고 하면 iterator를 통하여 14개의 요소를 통과해야 한다는 것이다.

반면에 Vector는 Array 처럼 요소들을 연속된 Memory에 저장하고 있다. 그래서 Vector는 random access 가 가능하다. 예를 들어 15번째 요소에 접근 하려면
std::vector<int> vec(2);
vec[15] = 10;

그래서, List는 random access 가 필요한 STL algorithm 은 사용하지 못한다.

3.) Iterator Invalidation
List에서는 삭제나 삽입작업이 interator를 무효화 하는 경우가 없다. 왜냐하면 삽입이나 삭제할 경우에도 요소가 움직이는 경우가 없이 몇개의 포인터만 변경되기 때문이다.

4.) Special Member Fucntion
std::list 가 random access 를 제공하지 않기 때문에 많은 random access 를 사용하는 많은 STL 알고리즘들이 List에서 사용되지 못한다. 그래서 std::lisst에서는 추가적인 함수들을 제공하는데 이들은 Sorting, Spicing, Removing 인 것들이다.

2020년 5월 7일 목요일

MATLAB IDE 관련

1. 현재 폴더의 column 항목을 변경하고 싶을 때
    - 현재폴더 window의 오른쪽 위 화살표를 누르면 아래 이미지를 찾을 수 있고, 표시에서 변경하면 된다.

2020년 4월 29일 수요일

Designing Your Life | Bill Burnett | TEDxStanford | MYMEMO


목적: 커서 무엇이 되고 싶은지 안다.

잘못된 신념
    1) What is your passion
    2) You should know where you're going by now
    3) Be the best version of you

방법
    1) Who you are, What you believe, What you do 에 대한 일관적인 이야기를 만들어 내라
    2) Gravity and Accept, accept-empathize-define-ideate-prototype-test
    3) Ideate 3 five-year versions of me
    4) Prototyping
    5) Choosing well, gather&create -> narrow down ->choise->agonize->let go and move on

2020년 4월 26일 일요일

Notepad++, Notepad PlusPlus

1. Tab 을 한눈에 보고 싶을 때
    - Setting - General - Tab Bar - Multiline checked

Terminal, cmd, Teraterm

1. Terminal 에서 사용가능한 Font 설치
    - 마음에 드는 font 찾기
    - 설치(DejaVu) -> download 받은 후 ttf
    - console 에서는 monospace 설치 가능
 

    - 관련 정보
        1) monospace: 고정너비
        2) Command Prompt will recognize only monospace fonts

2. 색상 변경
    - 마음에 드는 색상 찾기
        - R:0, G:240, B:0 이 눈에 편했다.
    - Teraterm: setup-window 에서 색상 변경
    

2020년 4월 24일 금요일

C++ 시험공부

1. namespace
    scope 을 구분해 주는 역할을 한다.
    namespace 의 이름을 지정해 주면 using 혹은 name:: 을 통해서 접근이 가능하다.
    namespace without name
        - It's called an unnamed namespace / anonymous namespace. It's use is to make functions/objects/etc accessible only within that file. It's almost the same as static in C.

2. C++ 에서의 struct
    class 와 동일하게 동작하여 상속 등을 사용할 수 있다.
    다른점은 class 가 기본 접근지시자가 private 이라면 struct 는 public 이다.

3.  C++ 생성자와 초기화
    이렇게 하면 argument 로 member 변수가 초기화 된다.
    class name  {
        int member_x;
        int member_y;
    name(int arg1, int arg2) : member_x(arg1), member_y(arg2);
}


2020년 4월 22일 수요일

Source Insight

1. 지금 보고있는 file 의 Folder 열기
    1) cutom command 설정
    2) key 설정에서 해당 command 의 단축키 설정
        - ex> explorer %d 하니까 가능

2. Line Number
    1) Options -> Document Options
    2) 'Document Options' Dialog box -> Show line numbers 

2020년 4월 12일 일요일

python으로 google calendar api 사용

1.
python tutorial 에서 https://developers.google.com/calendar/quickstart/python
quickstart.py 까지 실행하여 credentials.json 생성

2.
만들어진 코드를 사용 하여 event 생성하면 만들어짐
https://github.com/karenapp/google-calendar-python-api

3.
excel 과 integration 할 것이기 때문에 win32com.client 라이브러리로 excel 사용

2020년 4월 1일 수요일

python 가상환경

1. 가상환경을 만든다.
2. 가상환경을 사용한다.

1. 가상환경을 만든다.
    option 1) python -m venv "내가상환경폴더이름"
        - venv 라는 module 을 사용해서 가상환경을 만들어라
    option 2) virtualenv "내가상환경폴더이름"
        - option 1과 동일한 작업을 수행한다.
        - python 과 virtualenv 를 바로 사용할 수 있는것은 내 컴퓨터에 해당 exe 가 있는 폴더가 환경변수 path 로 등록되었기 때문

2. 가상환경을 사용한다.
    - 가상환경 폴더에 scripts 라는 폴더가 생기고 그 안에 python.exe 파일을 사용할 수 있다.