이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
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!오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 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 (한국어)