Ask Your Question

sakshi's profile - activity

2020-01-14 08:10:26 -0500 received badge  Notable Question (source)
2018-07-24 07:12:10 -0500 received badge  Popular Question (source)
2017-09-12 23:41:21 -0500 received badge  Famous Question (source)
2017-06-05 05:32:04 -0500 received badge  Notable Question (source)
2017-04-11 07:01:32 -0500 received badge  Popular Question (source)
2016-07-22 09:41:48 -0500 received badge  Critic (source)
2016-07-21 07:28:09 -0500 asked a question How feature matching works in opencv?

I have the (x,y) location of points in two images now I want to perform keypoint matching

2016-07-13 07:34:03 -0500 received badge  Enthusiast
2016-07-12 13:23:32 -0500 commented question Stroke width transform

but..how to implement it in python .?? Can u explain me how to compute the width of the stroke ?

2016-07-12 09:04:42 -0500 asked a question Stroke width transform

how to find the stroke width transform of an image using opencv (python).

2016-06-24 13:55:22 -0500 commented question Facial keypoints detection

hmm... is there something in opencv to detect facial keypoints?

2016-06-24 13:50:05 -0500 received badge  Scholar (source)
2016-06-24 13:48:03 -0500 asked a question Facial keypoints detection

How to use dlib library in python to detects facial keypoints in an image???

2016-06-20 07:47:18 -0500 received badge  Supporter (source)
2016-06-20 07:46:45 -0500 commented answer How to create mask from an image in opencv?

is there something in python also? or could u explain me the approach?

2016-06-19 09:30:58 -0500 received badge  Editor (source)
2016-06-19 09:27:31 -0500 asked a question How to create mask from an image in opencv?

the mask which i want to create can be of some specific region of the image , For example

image description

this is the image from which i want create mask of the face of cat( i.e including eyes , nose , mouth ) or like if i want to create the mask only for the ears i want to create mask for :

image description

the mask :

image description

how to select the region and create mask??

2016-06-11 10:40:11 -0500 asked a question I have to find the homography that best warps the images into the same perspective.

I have used RANSAC algorithm to find the homography and wrap perspective operation to apply it to an image. here is the code

MIN_MATCH_COUNT = 10
img1 = cv2.imread('bus1.jpg',0)
img2 = cv2.imread('bus2.jpg',0)
sift = cv2.SIFT()

kp1, des1 = sift.detectAndCompute(img1,None)
kp2, des2 = sift.detectAndCompute(img2,None)

FLANN_INDEX_KDTREE = 0
index_params = dict(algorithm = FLANN_INDEX_KDTREE, trees = 5)
search_params = dict(checks = 50)
flann = cv2.FlannBasedMatcher(index_params, search_params)
matches = flann.knnMatch(des1,des2,k=2)

good = []
for m,n in matches:
if m.distance < 0.7*n.distance:
    good.append(m)

if len(good)>MIN_MATCH_COUNT:

  src_pts = np.float32([ kp1[m.queryIdx].pt for m in good ]).reshape(-1,1,2)
  dst_pts = np.float32([ kp2[m.trainIdx].pt for m in good ]).reshape(-1,1,2)

  M, mask = cv2.findHomography(src_pts, dst_pts, cv2.RANSAC,5.0)
  h,w = img1.shape

  result=cv2.warpPerspective(img2,M,(w,h))

cv2.imshow('result',result)
cv2.waitKey(0)
cv2.destroyAllWindows()

the input images are

image descriptionbus1.jpg image descriptionbus2.jpg the output image is

image description

it is not showing the whole image .what is wrong??