現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
Dectection shapes through image processing tools in MATLAB
14 ビュー (過去 30 日間)
古いコメントを表示
We are doing are project to detect shapes through image processing tools in MATLAB. We have used the canny method to detect the edges and bwareopen to remove small object from the image. We also using centriods, area and perimeter to detect the shapes. The problem we are having is that to find each shape the area is used, the problem with this is that it only works with certain size of shapes. If the size is too big or small it wont detect the shape. Is there any solution to detect shape with any size.
回答 (1 件)
Image Analyst
2015 年 3 月 2 日
Try Hu's image moments - they're scale and rotation invariant. See this video by someone at the University of Arizona: https://www.youtube.com/watch?v=Nc06tlZAv_Q
17 件のコメント
Image Analyst
2018 年 7 月 29 日
It's there - I just verified by going to it. Are you in a country that censors/bans youtube?
L
2021 年 8 月 10 日
Hello Image Analyst,
I have watched the Youtube video that you have suggested to Ashes. It is a great video.
Also, I have tried to find the Hu Moments Matlab code mentioned in the video, but I can't find it.
Please, will you send me the link of the code, or the code, because you have wrote that the code is there?
Thank you in advance.
Regards!
L
2021 年 8 月 11 日
編集済み: L
2021 年 8 月 11 日
OK, thank you.
But you have wrote to Ihtisham before that the code is there. Maybe you can provide me the link of the code on the site?
I would like to detect various AC connectors on the variagated and colored wall in a cluttered image, reliably (only one type of connector at the time) with image processing, and without artificial intelligence if it is possible.
I have tried with the SURF detector, but the connector's shape is very simple and primitive, and the SURF detector cannot recognize it and I can't not draw the bounding box around it.
I have checked your posts, since you are an expert in this field, and I have seen the suggestion with Hu moments.
Also, I have thought about template matching, but the correlation is sensitive on noise, I think it won't be a reliable solution.
Do you have a suggestion?
Thanks
Image Analyst
2021 年 8 月 12 日
I don't recall coding it up. If you can't find it on one of my prior posts, then I don't have it. I searched my demos folder and there's nothing there on that. I do have other moments and attach those just for fun.
If you can't find the code on the University of Arizona College of Optical Sciences (my alma mater) web site anymore then you'll have to try to get it from the video or write it yourself from the description. It's been 9 years since that video was posted so I would not be surprised if the software is not there anymore.
L
2021 年 8 月 12 日
OK, thank you for the quick response.
Too bad, that video looks great, and the code too.
It is not the problem the calculation of the moments, I don't know how to used them for object detection, i.e. to detect the object and mark it with the rectangle.
I am aware, that I need a template image with the custom object (the AC connector outlet for example) and I need the image with cluttered scene with the object in it. Then, I need to calculate the moments for both images, but later I don't know how to use them for the matching and marking.
An interesting case is when the AC outlet and the wall are both in same color (for example both are white, or both are gray, or both are black). Since the background and the object are the same, and the AC outlet is a very simple and primitive shape, maybe the moments are not the best way for the detection, I don't know. These are the worst examples for detection. I have attached you some images. Naturally, the goal is to detect the specified AC outlet (only one at the time) in any image (unrelated to the wall color).
Maybe you have a suggestion?
Thank you in advance.
L
2021 年 8 月 12 日
編集済み: L
2021 年 8 月 14 日
Thank you.
SInce you have suggested the AI, you think it is impossible to detect the AC outlet without the CNN networks? I believe in your knowledge and experience, thank you.
I never used the CNN networks. I saw some examples on Mathworks and OpenCV related websites (OpenCV examples are related with Python frameworks if I understood correctly, but I am not a programmer, I am not familiar with Python).
But, I haven't seen the examples how can I train the networks with custom images (for example of I capture 20, 50, 100,... images with AC outlet)?
How should I import my images in the networks?
Also, I saw the RCNN networks on the website. Mask-RCNN in interesting on the first look.
Can you suggest me a link with an example where the Yolo, Segnet, or RCNN object detection are performed with custom images (not with already trained CNNs)? I cannot find such an example.
Also, is there an online tool for making these CNNs, and later maybe I could import them in the examples? I am not familiar with this topic.
Thank you in advance.
Image Analyst
2021 年 8 月 14 日
@L, the more training images the better. But I'd say at least a hundred. Perhaps less if your outlets all look very similar. You can get more though augmentation where you change the size, color, orientation, etc. There is a function that does augmentation for you. Fortunately you have all these images already, otherwise you'd have no need to work on this project. Who is your sponsor? Undoubtedly your sponsor, who hired you to do this, and has the need, has thousands of images to supply you with. If they don't then there is no need to do the project.
Start with the Mathworks main page, or the page for the Deep Learning Toolbox. There is also the Deep Learning Onramp. There is extensive documentation and training for free and I can't help you through all that. Or you can take an in-person day or two training class from them like I did.
L
2021 年 8 月 14 日
Hello,
Thank you, this guide from you is very helpful.
I don't have a sponsor, this project looks very interesting to me, it is not easy, but is would be a good starting point for some next project (since this is not an easy problem).
It is not a problem to make enough images. I will capture them quickly.
The main thing is to find a guide for image and database preparation, and later how should be used the database for training and object detection and marking in the cluttered image.
I hope the Deep Learning Onramp will help me. Who should I contact for in-person day, or for the classes?
Also I saw the TensorFlow, Keras and Pytorch frameworks, but they are Python-based platforms. There are some tutorials too, but I never used the Python. The Matlab looks the best for me, I think, since I am not a programmer.
Thank you in advance.
Image Analyst
2021 年 8 月 14 日
編集済み: Image Analyst
2021 年 8 月 14 日
Try this course.
Not sure but it may be the combuster based training version of what I took in person.
Here is a list of all their courses, both online and in person:
MATLAB's deep learning capabilities beat out the Python based tools according to a recent Garner review of deep learning tools so I think you're right to stick with MATLAB.
And see this comparison:
L
2021 年 8 月 15 日
Thank you.
These links are very helpful. The comparison is obvious, I think. Matlab is the best for technical computing.
I will check that course.
I am sure that Matlab's deep learning capabalities (and other too) are better than the Python based frameworks, but those frameworks are open-source. This fact could be important for future projects, I think.
However, first I will try to learn the Matlab deep learning solutions.
I have tried to find a mask-rcnn demo in Matlab (on Mathworks website) where the process of forming a custom image database and testing is shown and tested, but I cannot find it. This link shows a COCO based example. https://www.mathworks.com/help/vision/ug/example-InstanceSegmentationUsingMaskRCNNDeepLearningExample.html
Also, this is the other link, but this is only an introduction, I think. https://www.mathworks.com/help/vision/ug/getting-started-with-mask-r-cnn-for-instance-segmentation.html
I cannot believe that there is no demo where the way of inserting images in order to train a new network is shown? Or, maybe I’m looking in the wrong place?
Also, this is an interesting examle too, but it also uses a prepared model. It uses 27 images, if I read it correctly, but I don't know how to replace those 27 images with my custom images?
L
2021 年 8 月 25 日
Hi Image Analyst,
I have watched the Onramp, and also I have watched another webinar course to. Now I am more aware of this topic, but all these courses were about classification. They didn't mentioned tha RCNNs.
Further, I have captured for startpoint 11 jpg images, and I have used the Image Labeler App in Matlab to annotate the connector as a mask. Also, I have converted the gTruth data to json file.
Now, I have the 11 images with json annotations (I think). The images are stored in one folder, the json file is in other folder.
Next, I would like to train them with mask-rcnn and to test the system using few read-in images images. This is only a small example in order to learn the procedure.
Unfortunatelly, I don't know how to train the network since some ready image database is used there with annotations with some helper functions and API. Since this is a prepared dataset ins the demo, it is very confusing, the part after "Download Training Data" https://www.mathworks.com/help/vision/ug/example-InstanceSegmentationUsingMaskRCNNDeepLearningExample.html#InstanceSegmentationUsingMaskRCNNDeepLearningExample-1
How can I use this part of the code on my 11 train images and my 1 json file (I have labeled only one area in the image, because I would like to detect only one object).
Thank you.
Image Analyst
2021 年 8 月 25 日
support@mathworks.com, but personally I'd call them to get a live person on the phone.
参考
カテゴリ
Help Center および File Exchange で Image Processing and Computer Vision についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
アジア太平洋地域
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)