본문 바로가기

전체 글

Array Roate Clockwise/Anti-Clockwise /* * clockwise rotate * first reverse up to down, then swap the symmetry * 1 2 3 7 8 9 7 4 1 * 4 5 6 => 4 5 6 => 8 5 2 * 7 8 9 1 2 3 9 6 3 */ void rotate(vector &matrix) { reverse(matrix.begin(), matrix.end()); for (int i = 0; i < matrix.size(); ++i) { for (int j = i + 1; j < matrix[i].size(); ++j) swap(matrix[i][j], matrix[j][i]); } } /* * anticlockwise rotate * first reverse left to right, the.. 더보기
Nerf란 1. 개요 - NeRF는 2020년 NeRF: Representing Scenes as Neural Radiance Fields for View Synthesis라는 논문에 의해 소개되었다. - 쉽게 말해 2D 이미지를 3D로 변환해 준다 - 엄밀하게는 여러장의 이미지를 입력 받아, 새로운 시점에서의 물체 이미지를 만들어내는 View Synthesis 모델이다. - n개의 시점에서 불연속적인 2D 이미지를 입력 받아, 이미지가 연속적으로 구성될 수 있도록 임의 시점에서의 새로운 이미지를 만들어 낸다. Nerf는 이미지 데이터에서 직접 학습하지만 CNN 레이어나 Transformer 레이어(적어도 원본은 사용하지 않음)를 사용하지 않는다. Nerf의 이점은 압축이다. 5–10MB에서 Nerf 모델의 가중치.. 더보기
Eight Points algorithm(Normalized) - 과제 해결 Part 1: Normalized 8-Point Algorithm In eight_point_fw, implement the function find_fundamental_matrix. This function takes 2 sets of corresponding key points from the 2 images and computes the fundamental matrix. For stability of the algorithm, we would want to first normalize the points. For this we follow the following steps: Find the centroid of the points (find the mean x and mean y values).. 더보기
Epipolar Geometry OpenCV: Epipolar Geometry OpenCV: Epipolar Geometry Goal In this section, We will learn about the basics of multiview geometry We will see what is epipole, epipolar lines, epipolar constraint etc. Basic Concepts When we take an image using pin-hole camera, we loose an important information, ie depth of the docs.opencv.org 그림에서 보다 시피 단안만을 이용하면 X의 투영되는 점이 OX 선중 어떤 3D 상의 점인지 알기 어렵다. 하지만, 다른 각도의 이미지.. 더보기
포인터 vs 참조자 void swap(int *x, int *y) 포인터는 변수의 주소가 파라미터로 전달된다. void swap(int& x, int& y) 참조자는 변수의 Alias가 파라미터로 전달된다. Alias와 파라미터의 주소는 동일하다. 따라서, 참조자의 값 변경시 전달된 변수의 값 또한 바뀐다. 차이점) 1. 포인터는 재 할당될 수 있지만, 참조자는 초기화시에 할당되고 재 할당이 안된다. 2. 참조자는 NULL 값을 할당 받을 수 없다. 포인터는 가능하다. 3. 포인터++은 메모리 이동이고, 참조자++은 값 1 증가이다 4. 포인터 변수의 주소와 변수 주소는 서로 다르지만, 참조자 주소와 변수 주소는 서로 동일하다. 5. 포인터는 ->로 멤버에 접근하고, 참조자는 . 로 멤버에 접근한다. 6. 포인터는 *로 역.. 더보기
OpenCV는 Row-Major, Matlab은 Column-Major 출처: https://stackoverflow.com/questions/8184053/accessing-elements-of-a-cvmat-with-atfloati-j-is-it-x-y-or-row-col Accessing elements of a cv::Mat with at(i, j). Is it (x,y) or (row,col)? When we access specific elements of a cv::Mat structure, we can use mat.at(i,j) to access the element at position i,j. What is not immediately clear, however, whether (i,j) refers to the x,y coord... stackoverf.. 더보기
PCL RGB 1. RGBA 1.1 Packing int rgb = ((int)r) 16) & 0x0000ff; std::uint8_t g = (rgb >> 8) & 0x0000ff; std::uint8_t b = (rgb) & 0x0000ff; 5가지 입력 더보기 (1) 인자를 안 받는 경우(RGBL의 경우는 라벨만 입력을 받는 경우) constexpr pcl::RGB::RGB( ) constexpr pcl::PointXYZRGBA::PointXYZRGBA() constexpr pcl::PointXYZRGBL::PointXYZRGBL(std::uint32_t_label = 0) (2) 포인트 한 점을 입력으로 받는 경우 constexpr pcl::RGB::RGB(const _RGB &p) constexpr pcl::.. 더보기
erode & dilate 참고 자료: https://docs.opencv.org/4.x/d9/d61/tutorial_py_morphological_ops.html OpenCV: Morphological Transformations Goal In this chapter, Theory Morphological transformations are some simple operations based on the image shape. It is normally performed on binary images. It needs two inputs, one is our original image, second one is called structuring element or kernel wh docs.opencv.org C++ 버전 문서:.. 더보기