Detect only needed circles without thresholding

I have an image of some test machine . I want to detect only 4 circles because these are used to limit the wanted range.I will use the centers of theese circles to extract only the needed image which is only the propeller.can any one help me please? Other ideas are welcome. (i dont want to use the thresholding because i have more Pictures with different intensities)

回答 (1 件)

Image Analyst
Image Analyst 2016 年 12 月 10 日

0 投票

How much do the circles move from one snapshot to the next? Can you just use a mask/template to look in 4 known, predetermined regions?

10 件のコメント

Yassine Zaafouri
Yassine Zaafouri 2016 年 12 月 12 日
if the user does not move the camera , the circles stay in the same positions but the Problem here that cameras would be changed so does its Position . This step is a first step of my code because later i want to work and focus only on the part in the middle while changing cameras . Then the position will Change for some Millimeters and i want the code to be implemented for all cases. Do you mean that i have to do that manually each time ? because i did not understand exactly what do you mean .
Image Analyst
Image Analyst 2016 年 12 月 12 日
First I'd try to find the gigantic squares. Then fit a line though their edges to find the precise center point of the big 4 squares. Then use imtranslate() to shift your image so that the center is exactly in the middle of your image. Then the 4 small circles should be at known locations, unless your zoom or angle of view has changed. Then you can crop out those 4 circles and try to find their centers more accurately if you need to.
Yassine Zaafouri
Yassine Zaafouri 2016 年 12 月 13 日
It seems to be a very good idea . Can you just tell me how to find the gigantic squares and to fit lines through the edges please? Thank you
John BG
John BG 2016 年 12 月 13 日
編集済み: John BG 2016 年 12 月 13 日
catching the circles, or the squares is not that complicated compared to the perspective calibration (aka tangential aberration).
Is what you are are after explained in the following links
Image Analyst
Image Analyst 2016 年 12 月 13 日
Looks like thresholding followed by bwareafilt() to extract the two largest areas should work.
John BG
John BG 2016 年 12 月 14 日
yes, but X Y calibration of perspective is still needed yet Zaafouri didn't mention it in the question.
As you have pointed out, for an expert it's straight forward to capture known shapes.
The perspective calibration is the real problem here.
The point that no comment yet added answering your comment tells that probably the real trouble to solve with this question is actually the perspective calibration or other something else not yet mentioned.
Image Analyst
Image Analyst 2016 年 12 月 14 日
編集済み: Image Analyst 2016 年 12 月 14 日
I have no idea what all that stuff is. It looks sort of like a fan spinning. But I'm assuming that the big square checkerboard and the small circular checkerboards are in the same plane and at the same magnification (spatial calibration). If they're at different distances, then a more complicated calibration would be required.
Yassine Zaafouri
Yassine Zaafouri 2016 年 12 月 15 日
Sorry for the late answer.To be honest I am not an Image expert so i did not thought about the spatial calibration. And yes the checkerboards are in the same plan. SO do you have a demo that Shows how can i detetct the shapes of the square ? and if it is possible, without thresholding because i am working with different cameras and different gains so the brightness can change from an image to another. Thank you
Yassine Zaafouri
Yassine Zaafouri 2016 年 12 月 21 日
Mr Image Analyst can you help me detecting the big squares whaterver the intensity and brightness of pixels is please ? because i am changing the Integration time and the gain of the camera. Thank you
Image Analyst
Image Analyst 2017 年 1 月 26 日
Not unless you put back up the image(s). They used to be there but now they're gone. I don't have anything to work with!

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeMATLAB Support Package for USB Webcams についてさらに検索

質問済み:

2016 年 12 月 7 日

コメント済み:

2017 年 1 月 26 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by