Detecting Specific Pattern by Clustering the Corners & Calculating Relative Transformation of Two Cameras

Github Link of This project

The Github link of this project is https://github.com/JasonChu1313/CameraPoseEstimating.

OverView of This Project

This project detects harris corner of the pattern, and cluster these corners based on the density醋虏,and then process these clustered pattern to identify which pattern it is and the target is to find the feature points of these pattern and using Perspective-N-Points algorithm to calculate the extrinsic parameters of the camera. So we can get the position of the camera relative to the other camera or object, if we have the relative position from one camera to the other, we can integrate the image captured by two cameras to do a better and precisely job such as 3D reconstruction or Robotic SLAM.

Detail of this Project

Recently I am working on calculating the transformation matrix of one camera relative to the other by using an easy-to-identitfied pattern(with complex corner points) attached to the target camera. Recognizing the pattern is easy but when it comes to detect object which is far from the camera, the task becomes harder. Because the complex environment interferes with the detection and both feature-based and deep learning based algorithm perform not well when detecting object which is far, my purpose is to design a workflow to solve this problem.

To solve this problem I have tried different ways both to detect the pattern’s key points and to calculate the transformation.
I first tried to use the QR code as an object to detect, because the pattern of QR code is well organized and we can also embed information into it, but after implementing it I found that the algorithm performs not good enough even in the distance more than one meter away. And using a perspective model to calculate the transformation needs to constrain the sides of QR code must be perpendicular to the ground, which seems impossible for the 3-D environment. The following link shows the process:

https://v.qq.com/x/page/h0561m4qjh2.html

Then I tried to use chessboard to solve my problem, because the pattern of chessboard is also well organized and I can use the camera calibration to determine the intrinsic and extrinsic parameters of the camera. Next I located 4 points in a specific pattern, because once I find 4 points’ coordinates of the pattern in an 2-D image, I can associate these 2-D coordinates with 3-D coordinates we measured and camera parameters to solve a Perspective 4 Points problem to find the rotated vector and transformation matrix. Unfortunately this method can not solve the distance struggle. The following link shows the process:

1. Using camera calibration to determine the camera intrinsic parameter matrix. And store them.
2. Locating 4 points in the image and calculating the rotation vector and transformation matrix.

The following link shows how it works:
https://v.qq.com/x/page/g0561v0ikec.html
https://v.qq.com/x/page/l0561kxt26m.html

Moreover, I come up with an idea that we have to use the most easily found features that we can detect at a far distance, so I decided to use corner points, the workflow is showing here.

1. I used the opencv library function, but the effect is not very good, so I implemented my own corner point detection by applying the differential mask in x and y directions and the gaussian mask which is slightly different from Harris method.
2. The next step is to use Density-based clustering algorithm to cluster these points, because our pattern has the dense corner points, so it is easy to cluster them into one cluster.
3. We scan the clusters and drop those that do not meet our criteria with regard to the shape of the pattern.
4. We chose the 4 Points to do the same job as the last method and calculate the relative position and posture of another camera.

The following link shows the how it works: (The green points represent the noise detected by my algorithm, and the points in different color represent different cluster)

https://v.qq.com/x/page/o0561prp6eg.html

Some Prospective

I found that the complexity of our pattern has relationship with the detection which is that if it is too complicated the corner points are harder to detect at a far distance, but if it is not complicated enough we can easily be confused with the environment noise, so I want to still focus on this topic and look for a good way to generate a pattern to be easily recognized. This process is just the opposite of the detection process, we think of the problem in a reverse thinking which is novel and there is a great application.

?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市柿扣,隨后出現(xiàn)的幾起案子暗赶,更是在濱河造成了極大的恐慌橄镜,老刑警劉巖,帶你破解...
    沈念sama閱讀 217,509評(píng)論 6 504
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場離奇詭異伞矩,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)尽纽,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,806評(píng)論 3 394
  • 文/潘曉璐 我一進(jìn)店門咐蚯,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人弄贿,你說我怎么就攤上這事春锋。” “怎么了差凹?”我有些...
    開封第一講書人閱讀 163,875評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵期奔,是天一觀的道長。 經(jīng)常有香客問我危尿,道長呐萌,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,441評(píng)論 1 293
  • 正文 為了忘掉前任谊娇,我火速辦了婚禮肺孤,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘济欢。我一直安慰自己赠堵,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,488評(píng)論 6 392
  • 文/花漫 我一把揭開白布船逮。 她就那樣靜靜地躺著顾腊,像睡著了一般。 火紅的嫁衣襯著肌膚如雪挖胃。 梳的紋絲不亂的頭發(fā)上杂靶,一...
    開封第一講書人閱讀 51,365評(píng)論 1 302
  • 那天,我揣著相機(jī)與錄音酱鸭,去河邊找鬼吗垮。 笑死,一個(gè)胖子當(dāng)著我的面吹牛凹髓,可吹牛的內(nèi)容都是我干的烁登。 我是一名探鬼主播,決...
    沈念sama閱讀 40,190評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼蔚舀,長吁一口氣:“原來是場噩夢(mèng)啊……” “哼饵沧!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起赌躺,我...
    開封第一講書人閱讀 39,062評(píng)論 0 276
  • 序言:老撾萬榮一對(duì)情侶失蹤狼牺,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后礼患,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體是钥,經(jīng)...
    沈念sama閱讀 45,500評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡掠归,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,706評(píng)論 3 335
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了悄泥。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片虏冻。...
    茶點(diǎn)故事閱讀 39,834評(píng)論 1 347
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡,死狀恐怖弹囚,靈堂內(nèi)的尸體忽然破棺而出厨相,到底是詐尸還是另有隱情,我是刑警寧澤余寥,帶...
    沈念sama閱讀 35,559評(píng)論 5 345
  • 正文 年R本政府宣布领铐,位于F島的核電站悯森,受9級(jí)特大地震影響宋舷,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜瓢姻,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,167評(píng)論 3 328
  • 文/蒙蒙 一祝蝠、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧幻碱,春花似錦绎狭、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,779評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至恍风,卻和暖如春蹦狂,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背朋贬。 一陣腳步聲響...
    開封第一講書人閱讀 32,912評(píng)論 1 269
  • 我被黑心中介騙來泰國打工凯楔, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人锦募。 一個(gè)月前我還...
    沈念sama閱讀 47,958評(píng)論 2 370
  • 正文 我出身青樓摆屯,卻偏偏與公主長得像,于是被迫代替她去往敵國和親糠亩。 傳聞我的和親對(duì)象是個(gè)殘疾皇子虐骑,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,779評(píng)論 2 354

推薦閱讀更多精彩內(nèi)容

  • 媽媽,媽媽赎线! 你過來我告訴你一個(gè)小秘密廷没! 我發(fā)現(xiàn)了爸爸的私房錢了…… 兒子貼在媽媽的耳邊悄悄地說,生怕爸爸聽到氛驮! ...
    尚元浩禹閱讀 352評(píng)論 1 0
  • 我們每天都會(huì)有很多的相遇腕柜,有一種相遇,我稱之為“三觀”的相遇。對(duì)人盏缤、對(duì)事砰蠢、對(duì)物有一樣的感受和追求。 2017年7月...
    華晨曦閱讀 211評(píng)論 0 0
  • 蒹霞蒼蒼,白露為霜潭流,在這個(gè)秋高氣爽的清晨竞惋,涼風(fēng)穿過帶有紗窗的玻璃窗,吹散了你有些郁悶的心情灰嫉。 記得剛崴住腳的那天拆宛,...
    那時(shí)那刻閱讀 246評(píng)論 0 1