분류 전체보기
-
python 2진수, 16진수, bit연산카테고리 없음 2023. 3. 29. 20:01
python에서 2진수, 16진수를 만드는 법과 bit 연산 1. 2진수, 16진수 만드는 방법 0x를 붙여서 16진수를 만들 수 있다. 0b를 붙여서 2진수를 만들 수 있다. 2. 10진수를 2진수, 16진수 형태로 변환, 혹은 역변환 2진수를 만들 때는 bin 함수를 사용한다. 16진수를 만들 때는 hex 함수를 사용한다. 결과물의 형태는 string 이다. 반대로, 10진수로 돌아올 때는 int 함수를 사용한다. (함수의 두번째 인자로, input의 기수를 쓴다.) 3. bitwise 연산에, & 와 |를 쓴다. bitwise and 에 &를 사용한다. bitwise or 에 |를 사용한다. * 문득, 생겨난 궁금증... 1&2는 true 일까 false 일까? 1과 2를 각각 true로 해석 후,..
-
python 예외 처리 try / except카테고리 없음 2023. 3. 7. 18:16
python 코드에서 예외처리를 위해 try / except를 주로 사용한다. 실제로, try / except / else / finally 의 세가지가 아래와 같은 역할을 한다. 이를 통해 directory를 만드는 함수를 예제로 만들어 테스트해보았다. import os def mkdir_except(dir): try: os.mkdir(dir) except FileExistsError as e: print('이미 경로가 존재합니다.',e) except FileNotFoundError as e: print("상위 경로를 찾을 수 없습니다.", e) else: print("경로를 만들었습니다.") mkdir_except('test/test') mkdir_except('test') mkdir_except('..
-
reprojection error (camera calibration)영상처리/Camera Calibration 2023. 3. 3. 17:21
reprojection error란 무엇일까? image plane에서 관측된 point에 대해서, 3D feature point가 image plane에 projection되어 distortion 된 reprojected point 가 벗어난 정도를 의미한다. https://www.camcalib.io/post/what-is-the-reprojection-error The Reprojection Error? The reprojection error. What is it? How does it relate to your application? This article will answer your questions. www.camcalib.io 그림으로는 아래와 같다. m은 영상에서 측정된 feature ..
-
Epipolar geometry영상처리/3D computer vision 2023. 2. 12. 15:43
Epipolar geometry란, stereo vision의 geometry이다. 3D vision의 기본 모델이라고 할 수 있겠다. 검색해보면 좌표계의 notation이 제대로 안된 식들만 보여서 정확히 이해가 어려웠다.... 스스로 이해한 것들을 여기에 정리하고자 한다. 공간상의 점 P를 카메라 C1/ C2에서 관찰하는 상황을 모델로 정한다. 이때, "기존의 카메라 위치 C1 / 공간상의 점 P / 새 카메라 위치 C2를 포함한 평면" 을 epipolar plane 이라 한다. 여기에 좌표계의 transformation이 필요하다. (관찰한 좌표계를 명시하지 않으면 큰 혼란이 야기된다.) 위의 모델을 이 기준으로 표현하면, T2_1은 C1에서의 관찰을 C2로 변환해주는 변환이 된다. P1은 P를 C..
-
affine transformation카테고리 없음 2023. 2. 2. 21:20
homogeneous coordinate를 공부하다보니 affine transformation이 자주 언급되어 같이 정리를 해보았다. Affine transformation https://en.wikipedia.org/wiki/Affine_transformation Affine transformation - Wikipedia From Wikipedia, the free encyclopedia Geometric transformation that preserves lines but not angles nor the origin An image of a fern-like fractal (Barnsley's fern) that exhibits affine self-similarity. Each of the l..
-
Homogeneous coordinate영상처리/3D computer vision 2023. 2. 2. 21:07
computer vision을 공부하면 제일 먼저 만나는 건, 역시나 pinhole camera 모델이다. 그 pinhole camera 모델을 공부하려면 이제 homogeneous coordinate로 시작하게 된다. 하지만 생각보다 정의가 명확하지 않아, 공부를 시작하다보면 여기서 좀 막히는 경향이 있다... (그러려니 라고 생각하면 별 문제는 없다.) Homogeneous coordinate https://en.wikipedia.org/wiki/Homogeneous_coordinates Homogeneous coordinates - Wikipedia From Wikipedia, the free encyclopedia Coordinate system used in projective geometry ..
-
CNN 기반 camera pose estimation의 한계영상처리/3D computer vision 2023. 2. 2. 11:02
제목이 너무 단정적인가 싶은데 논문 제목 자체가 "Understanding the Limitations of CNN-Based Absolute Camera Pose Regression" 이다. https://openaccess.thecvf.com/content_CVPR_2019/html/Sattler_Understanding_the_Limitations_of_CNN-Based_Absolute_Camera_Pose_Regression_CVPR_2019_paper.html CVPR 2019 Open Access Repository Torsten Sattler, Qunjie Zhou, Marc Pollefeys, Laura Leal-Taixe; Proceedings of the IEEE/CVF Conferen..
-
코딩 교육 로봇 -네오씽카Diary 2023. 1. 29. 00:28
아이의 코딩 교육을 빙자하여 교육용 로봇을 하나 구입하였다. 이름하여 네오씽카. 결론부터 얘기하자면 강력 추천이다! (기대 이상이다. 왜 홍보를 안할까?) 쇼핑몰에서도 그렇고, 홍보 영상에서도 그렇고, 완제품 형태로 보여줘서 그냥 완제품으로 올줄 알았다. 하!지!만! 다 직접 만들어야 한다 후후후 (레고를 만들줄 안다면 어렵지 않다) 설명서도 나름 자율주행의 의의부터 시작한다. 너무 거창한거 아닌가? 하고 있었는데 각 부품의 동작 원리와 기본 동작 테스트를 해보는 설명까지... 진짜 개발자가 된 느낌을 준다... 아이와 함께 하다보니, 조립은 두시간여 걸린듯한다... (A-type으로) https://youtube.com/shorts/bfjben-XQAY?feature=share 첫 주행 영상이다