[Blog Project combat] Steel pipe Identification Project 1

Source: Internet
Author: User

Steel Pipe Identification Project 1
0, related instructions:Let's take a look at the relevant instructions first. In the "jsxyhelu.cnblogs.com/Project actual Combat" column appears in the needs, pictures and other resources, are I browse the website, forum and other sites through the formal channels to obtain the real needs. Personally feel more interested, but because of time or work conflict oneself did not go to pick up these items. But because these requirements are very valuable to achieve, so after a period of time, still took out to practice a practiced hand, and achieved the core module. Hope to be able to give the visitors some inspiration. If you think these pictures and resources are not suitable here, please contact me in time ([email protected]), I will deal with it in time. In addition, I will make the core code and technical details as clear as possible, I think this is the most valuable way. If you need the original code, you can also contact me. first, the original needs/pictures:Second, preliminary analysis:The steel tube is characterized by its depth, which creates a shadow inside the tube. Finding and identifying this shadow is the main way to solve the problem. at the same time, one thing to note is that the arrangement of the pipe itself is in accordance with the physical characteristics, that is, in general to conform to this situation, which is a priori knowledge. The disturbance is that the shadow is not only inside the tube, but also between the pipe and the pipe.In addition, the actual picture of the pipe is blocked, this is also necessary to consider. Three, the solution:grayscale and threshold processing to get such results. It is important to note that Ostu is not usedhere. It is true that Ostu are very useful, but there are times when it is not good. Even a fixed threshold is better than the Ostu effect in this case, and you can try it. look for all contours, first removing part of the area based on the area of the contourtwo figure control, you can find that according to the area constraints, lost something. On the one hand are the pipes which are blocked, and the one on the other is the ones that are combined with the shadows next to them. This needs to be done specifically and constrained by prior knowledge. This result is obtained when the picture of the current period is rounded and the radius is limited. The main interference is the circle that is identified between the holes. four, difficult to tackle:first, the removal of interference in the identification results, mainly between the pipe and the gap between the pipe caused by the false identification bool ellipseLikeCircle(RotatedRect rotatedrect)
{
    float width  = rotatedrect.size.width;
    float height = rotatedrect.size.height;
    if (width/height >= 1.6 || height/width >= 1.6)
    {
        return false;
    }
    if (min(width,height)>20*1.2)
    {
        return false;
    }
    return true;
}
second, the image of those blocked parts, using the opposite way to identify, and finally superimposed the results together
another picture (to adjust the threshold)
Iv. Reflection of the summary:for this kind of direct drawing in the actual, but also used in the actual project (compared with the production line of the kind of large-scale batch), I think the semi-automatic is better than the fully automated effect. After all, the image quality is there, and it's easy to optimize for that direction, and the optimization of the algorithm can be complicated. but ultimately it is important to get useful results, which is valuable. Instead of making it fully automatic, it is better to make the image recognition part of the auxiliary recognition, to do repetitive work (such as identifying which easy-to-identify pipe) to be done by the machine, and to give the complex identification to the person, so as to provide efficiency and improve the recognition efficiency. similar to this is a lot of Android software now, in use, there is a frame, asked you to identify the image of the box into it. I do think that the use of such a site, it is best to useAndroid Run, but running on the desktop is also valuable. This aspect is studied separately. However, it is not possible to reduce the optimization of the algorithm, in the final analysis, algorithm optimization is fundamental. P.S in[Blog algorithm principle] Select contour (select_shape), I studied on how to imitate the form of Halcon, the size of the outline and the characteristics of the circle, but also can get good results, interested can see. At the same time, in the "Steel Pipe Identification Project 2", I do some research on the use of GUI interface-assisted recognition.


From for notes (Wiz)

[Blog Project combat] Steel pipe Identification Project 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.