Reference from example(find_obj.cpp) in openCV , there are steps as following:
1. Load source image and destination image with cvLoadImage(filename,CV_LOAD_
IMAGE_GRAYSCALE)
2. Data type cvSURFParams is used to do something? (Need more documentation)
3. Function cvExtractSURF is used to extract SURF feature points and descriptors for both source and destination images. By calling cvExtractSURF, it will give us info about key points(x and y location) in image and descriptor of each point. These info are kept in CvSeq data type where objectKeyPoints is used to keep location of key points and objectDescriptors is used to keep descriptor of each key point.
4. Function findPairs have iteration based on number of descriptor of sourc image. For each descriptor of source image is compared with every descriptor of destination image. Vector ptPairs is used to keep index of correspondence descriptors. ptPairs kept vector in pair of source descriptor index and destination descriptor index. (i.e. (1st src descriptor index, index of similar destination descriptor, 2nd src descriptor index, index of similar destination descriptor, 3rd src descriptor index, index of similar destination descriptor,......, nth src descriptor index, index of similar destination descriptor))
Precisely, even index of ptPairs will point to source objectKeyPoints and odd index of ptPairs will point to destination imageKeyPoints. Now , you will get point correspondences between two image.
ไม่มีความคิดเห็น:
แสดงความคิดเห็น