This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

*/

코로나 검사

오늘은 중앙 보훈병원 선별진료소에서 코로나 검사를 받았다. 

지난주 검사는 잠실운동장 건너편에 있는 임시 선별 진료소에서 받았는데 짧은 시간 검사지만 너무 아파서 조금 멀지만 이곳까지 왔다. 오전 10시 대기하는 사람은 2명으로 

남자분이 검사하는데 기대한 것처럼 콧속이 살짝 간지러운것으로 끝났다. ^^

검사 결과는 오후에 나온다고 한다. 빠르다.





코로나 간이 검사

 코로나 간이 검사를 받았습니다. ㅜ.ㅜ

잠실운동장 건너편 아시아공원 입구에 있는 간이 검사소에서... 점심시간전에 방문했는데 대기자 6~7명 수준으로 대기시간 10분이내에 진행이 되네요.

코에서 검체를 체취하는데 고통스럽습니다. 

빨리 백신이 도입되어야 할 것 같네요.

의료진들 봉사자들 모두 힘내세요.. 

Linux에서 파일명 일괄 변경

 현재 디렉토리 하위에 있는 file명이 from으로 시작되는 모든 파일(fromxxx.xx)을 to로 시작하는 파일로 한번에 변경

 find ./ -name "from*" | sed -e 'p' -e "s/from/to/g" | xargs -n 2 mv


rename 명령어로 변경하기

형식 : rename 's/파일명/변경할파일명/' 대상파일필터

예) 

 rename 's/from/to/' ./*

Visual Studio Code에서 arduino 사용하기

Visual Studio Code에서 arduino를 위한 확장 설치

설치순서


1.확장탭을 누르고 2.검색창에 "arduino"를 입력하면 arduino관련된 확장모듈이 검색된다. 첫번째로 검색된 Microsoft에서 나온 Arduino 확장의 3. install버튼을 클릭한다.

전제조건

Arduino IDE 필요. (다운로드 에서 arduino IDE를 다운받아 설치)

Visual Studio Code 설정

VS Code에서  < Ctrl > + < , > 두키를 동시에 누르면 Search settings 메뉴가 표출된다 여기에서 Extensions > Arduino configuration 을 선택하고 

아래와 같이 Edit in settings.json를 편집한다.
{
    "arduino.path""C:/Program Files (x86)/Arduino",
    "arduino.commandPath""arduino_debug.exe",
    "arduino.logLevel""info",
    "arduino.allowPDEFiletype"false
    "arduino.enableUSBDetection"true,
    "arduino.disableTestingOpen"false,
    "arduino.skipHeaderProvider"false,
    "arduino.additionalUrls": [
        "https://raw.githubusercontent.com/VSChina/azureiotdevkit_tools/master/package_azureboard_index.json",
        "http://arduino.esp8266.com/stable/package_esp8266com_index.json"
    ],
    "arduino.defaultBaudRate"115200
}
"arduino.path" 는 위에서 arduino IDE를 설치한 디렉토리를 기재하여야 한다.

Commands

  • Arduino: Board Manager: Manage packages for boards. You can add 3rd party Arduino board by configuring Additional Board Manager URLs in the board manager.
  • Arduino: Change Baud Rate: Change the baud rate of the selected serial port.
  • Arduino: Change Board Type: Change board type or platform.
  • Arduino: Close Serial Monitor: Stop the serial monitor and release the serial port.
  • Arduino: Examples: Show list of examples.
  • Arduino: Initialize: Scaffold a VS Code project with an Arduino sketch.
  • Arduino: Library Manager: Explore and manage libraries.
  • Arduino: Open Serial Monitor: Open the serial monitor in the integrated output window.
  • Arduino: Select Serial Port: Change the current serial port.
  • Arduino: Send Text to Serial Port: Send a line of text via the current serial port.
  • Arduino: Upload: Build sketch and upload to Arduino board.
  • Arduino: Upload Using Programmer: Upload using an external programmer.
  • Arduino: Verify: Build sketch.

Reference

관련문서



Image buffer를 Bitmap file format으로 저장하기(RGB)

Image처리를 하다보면 memory buffer에 있는 image raw데이터를 BMP포멧으로 저장할 필요가 있다.
RGB Buffer(24bit)를 widows bitmap format으로 저장하는 함수

// _fname : 저장할 파일 명( xxx.bmp )
// _buf : RGB 순서로 구성된 Image buff
// _w, _h : image width, height
void saveBMPfile(char *_fnameuchar* _bufint _wint _h)
{
    int filesize = 54 + _w * _h * 3;
    unsigned char bmpfileheader[14] = {'B','M'0,0,0,00,00,054,0,0,0};
    unsigned char bmpinfoheader[40] = {40,0,0,00,0,0,00,0,0,01,08,0};
    unsigned char bmppad[3] = {0,0,0};

    bmpfileheader2] = (unsigned char)(filesize    );
    bmpfileheader3] = (unsigned char)(filesize>> 8);
    bmpfileheader4] = (unsigned char)(filesize>>16);
    bmpfileheader5] = (unsigned char)(filesize>>24);

    bmpinfoheader4] = (unsigned char)( _w    );
    bmpinfoheader5] = (unsigned char)( _w>> 8);
    bmpinfoheader6] = (unsigned char)( _w>>16);
    bmpinfoheader7] = (unsigned char)( _w>>24);
    bmpinfoheader8] = (unsigned char)( _h    );
    bmpinfoheader9] = (unsigned char)( _h>> 8);
    bmpinfoheader[10] = (unsigned char)( _h>>16);
    bmpinfoheader[11] = (unsigned char)( _h>>24);

    FILE* fp;
    fp =fopen(_fname, "wb");
    if(fp!=NULL) {
        fwrite(bmpfileheader, 114, fp);
        fwrite(bmpinfoheader, 140, fp);
        fwrite(_buf, _w*_h, 3, fp);
        fclose(fp);
    }
}


* Gray Bufferer 저장하기 : 링크

관련문서

Image buffer를 Bitmap file format으로 저장하기(Gray image)

 Image처리를 하다보면 memory buffer에 있는 image raw데이터를 BMP포멧으로 저장할 필요가 있다.

Gray Buffer(8bit)를 widows bitmap fotmat으로 저장하는 함수

// _fname : 저장할 파일 명( xxx.bmp )
// _buf : RGB 순서로 구성된 Image buff
// _w, _h : image width, height
void saveBMPfile(char *_fnameuchar* _bufint _wint _h)
{
    int filesize = 54 + 256*4 + _w*_h;
    unsigned char bmppalete[256*4];
    unsigned char bmpfileheader[14] = {'B','M'0,0,0,00,00,054+256*4,0,0,0};
    unsigned char bmpinfoheader[40] = {40,0,0,00,0,0,00,0,0,01,08,0};
    unsigned char bmppad[3] = {0,0,0};

// BMP File header의 내용을 채워넣는다
// File의 크기
    bmpfileheader2] = (unsigned char)(filesize    );
    bmpfileheader3] = (unsigned char)(filesize>> 8);
    bmpfileheader4] = (unsigned char)(filesize>>16);
    bmpfileheader5] = (unsigned char)(filesize>>24);

// Image buffer의 Width
    bmpinfoheader4] = (unsigned char)( _w    );
    bmpinfoheader5] = (unsigned char)( _w>> 8);
    bmpinfoheader6] = (unsigned char)( _w>>16);
    bmpinfoheader7] = (unsigned char)( _w>>24);
// Image buffer의 Height
    bmpinfoheader8] = (unsigned char)( _h    );
    bmpinfoheader9] = (unsigned char)( _h>> 8);
    bmpinfoheader[10] = (unsigned char)( _h>>16);
    bmpinfoheader[11] = (unsigned char)( _h>>24);

// Pallet 정보 Windows Format의 구성 : RGBx 4Byte
// 8bit Image의 경우 Pallet의 크기 2^8 = 256
// Gray Image의 경우 RGB 동일값
    for(int i=0; i<256;i++) {
        bmppalete[i*4] = bmppalete[i*4+1] = bmppalete[i*4+2] = i;
        bmppalete[i*4+3] = 0;
    }
    FILE* fp;
    fp = fopen(_fname, "wb");
    if(fp!=NULL) {
        fwrite(bmpfileheader, 114, fp);
        fwrite(bmpinfoheader, 140, fp);
        fwrite(bmppalete, 1256*4, fp);
        fwrite(_buf, _w*_h, 1, fp);
        fclose(fp);
    }
}

* Color Buffer(RGB) 저장 : https://amosground.blogspot.com/2020/10/image-buffer-bitmap-file-format-rgb.html

관련문서

PC에서 ARM용 크로스 컴파일 후 strip 시 오류 발생

 OpenCV를 ARM용으로 Cross Compile후 strip실행시 아래와 같은 오류 발생

strip -s *.so   
    strip: Unable to recognise the format of the input file 'libopencv_calib3d.so'

원인은 strip을 호스트용을 사용해서 발생한 것으로 ARM용으로 strip을 할수 있는 arm-linux-gnueabi-strip을 사용하면 정상적으로 strip이 되는것을 확인할 수 있다.

arm-linux-gnueabi-strip -s *.so