a software approach to integrated machine vision

4
AN INTEGRATED IMAGE PROCESSING SYSTEM GIVES TO THE APPLICATION ENGINEER THE PERFORMANCE OF DEDICATED LIBRARIES, COMBINED WITH THE COMFORTABLE GRAPHICAL ENVIRONMENT OF RAPID PROTOTYPINC TOOLS AND THE EXTENSIBILITY OF COMPONENT-BASED SYSTEMS. By Earl Yardley hroughout the industrx quality requirements are increasing. At the same time, schedules become narrower and hudgets tighter. Products as well as production facilities are to be provided as fast and cost-effective as possible while maintaining maximum quality. producers of systems for automated visual inspection are not spared by this trend, either. The large share of software and the specific development conditions of these systems lead to specific problems, especially on the software side. THE DEVELOPMENT CYCLE The importance of image capturing and illumination notwithstanding - the evaluation software as the ‘byte-cast representation’ of the inspection strategy is the heart * IEE Computing B Control Engineering I Deiembei/lanuary 2004105 15

Upload: e

Post on 19-Sep-2016

214 views

Category:

Documents


2 download

TRANSCRIPT

AN INTEGRATED IMAGE PROCESSING SYSTEM GIVES TO THE APPLICATION

ENGINEER THE PERFORMANCE OF DEDICATED LIBRARIES, COMBINED WITH

THE COMFORTABLE GRAPHICAL ENVIRONMENT OF RAPID PROTOTYPINC

TOOLS AND THE EXTENSIBILITY OF COMPONENT-BASED SYSTEMS.

By Earl Yardley

hroughout the industrx quality requirements are increasing. At the same time, schedules become narrower and hudgets tighter. Products as well as production facilities are to be provided as fast and cost-effective as possible

while maintaining maximum quality. producers of systems for automated visual inspection are not spared by this trend, either. The large share of software and the specific development conditions of these systems lead to specific problems, especially on the software side.

THE DEVELOPMENT CYCLE The importance of image capturing and illumination notwithstanding - the evaluation software as the ‘byte-cast representation’ of the inspection strategy is the heart *

IEE Computing B Control Engineering I Deiembei/lanuary 2004105 15

Inspecting g e m with machine vision

of every vision system. A particular problem of the evaluation software is that its development takes place through continuous interaction with external constraints like the characteristics of the test pieces, imaging, and illumination conditions. The inspection strategy finally laid down in the software can only be determined according to the actual production conditions. On the other hand, the possibilities of algorithms and software- technology pose their own constraints which the application engineer has to take into account in the design of the system.

This situation creates a development cycle characterised by continual incremental changes leading to an often intolerable development time. It is aggravated by the fact that visual inspection systems are to a very high degree subject to ‘creeping specifications’, i.e. the necessity to make significant changes late in the development process or even after putting the system into operation.

In the development of image processing software, as in

other areas of software technology, two trends can be observed in the attempt to cope with these problems: a Rapid prototyping a Component-based development

RAPID PROTOTYPING This term denotes the rapid, interactive creation of prototypes which emulate as closely as possible the behaviour and user interface of the application to be developed. The typical workflow using such a tool has the application engineer experiment until he has found a sequence of image processing operations which extracts from the image material the desired quality parameters. In order to reach the processing speed required for industrial use, this image processing recipe will then usually be exported as C/C++ source code and integrated into the actual application.

The main advantage of rapid prototyping is that the application engineer can do his design work using an interactive tool, whereas the programmer will receive the results as source code, ready for integration.

However, the programmer will practically always need to create an application framework around the source code generated by the prototyping tool, which is far f” trivial. Furthermore, the generation of programming code using graphical tools is - as a rule ~ non-reversible. If changes become necessary during the integration of the generated source code into the application framework they can usually not be transferred back into the graphical environment. Synchronisation of the work done with the prototyping tool and that of the programmer on the fmal application will he very difficult - quite possibly to the point where it has to be done by hand.

COMPONENT-BASED DEVELOPMENT Probably the most conspicuous current trend in software technology is the attempt to industrialise software development by employing prefabricated components ~

analogous to the use of standardised hardware components. This is supposed to result in a significant increase in development speed and - ideally ~ a simplification of programming to such a degree that the application engineer himself can implement the final application. Thus the incremental development cycle described above could be accelerated.

Re-use of already found solutions for software development is of course not a new idea in itself. It is at least a s old as the first sub-routine libraries or as the automation of recurring tasks using batch files. The modern term ‘Component-based development’, however, refers almost exclusively to the use of precompiled binary components accessed through standard interfaces of the

16 B E Computing & Control Engineering I Oecemberllanualy 2004l05

integrated machine vision I I

! I ,

I

respective operating system. The most common such interface is the Component Object Model (COM) of Microsoff Windows which forms the basis of technologies like OLE Automation and Active-X Controls. Such components are characterised by the following properties:

Linking at runtime (instead of static linking as with traditional function libraries); Independence of specific compilers or programming languages through the specification of a communication interface; Suitability for visual programming. Especially the last item, that these components are

geared towards development with systems like Visual Basic, leads component library vendors to the statement that "the application programmer only needs to connect the components according to the logic of his application using a programming language like Visual Basic, Delphi or even C++".

The complexity hidden in this sentence should not be underestimated, however. The task of the programmer is nothing less than the creation of a consistent system design allowing the various objects to communicate with each other and ~ indispensable for industrial applications -with the external world. COM only specifies the exchange of primitive data types between components. Image processing, however, frequently requires complex data objects, like object boundaries and region descriptions so that the programming work required for this framework can be rather expensive for every single application.

It is interesting to note, in this respect, that, in highly sensitive areas like military and nuclear technology mainly very large components are used graphical user interfaces, entire operating systems, data base management systems (According to 'The Cost of Commercial-Off-The-Shelf Components', IEEE Compute,: June 1998). Each of these

I

I CC Large components serve to

I

' efficiency of the application

' increase the performance of ' the application as well as the

1 development. 99 I

components encompasses an entire application m a so that it can completely encapsulate interconnection logic and data flow for this application area. Such a consistent architecture allows for transporting complex data structures at a high level of abstraction so that much less work is required creating internal and external interfaces. Large components therefore serve to increase the performance of the application itself as well as the efficiency of application development.

INTEGRATED INDUSTRIAL IMAGE PROCESSING The two approaches described above ~ rapid prototyping and component-based development ~ are based on the observation that application development is most efficient when carried out by the application engineer himself who, on the other hand, cannot do the traditional work of a programmer However, as has also been shown, there are specific problems connected with both approaches.

An image processing tool intended to solve these problems will have to enable the application engineer to not only create a prototype of the application - as with a rapid prototyping tool ~ but the entire application itself. This means that it has to be prototyping tool as well as runtime environment. Such an integrated system will have to be suitable for a broad range of image processing problems. Its algorithms and its interfaces to the external world will have to be sufficiently powerful to allow the realisation of complete vision solutions without requiring the application engineer to ask for ad hoc enhancements from the programmer.

Thus the programmer is largely eliminated from the design and installation cycle of specific visual inspection systems. Also, the application engineer will not have to concern himself with somVm details as would be the case if he himself had to build the application from +

IEE Computing a Control Engineering 1 Deremkrllanuav 2w4105 17

Integrated machine vision

components. This means that the work of application engineer and programmer can be decoupled to a large extent, allowing each to concentrate on his special field.

It is clear, however, that an integrated system designed to be a general image processing tool cannot cover all special cases of arbitrary applications. Also it cannot exempt itself from the increasing integration and networking of programs and systems. The integrated macro languages, plug-in interfaces and OLE capabilities of office pmducts or web browsers clearly show the validity of this rule for all types of modern software applications.

This rule can be applied in two directions. A universal image processing system will therefore have to be extensible with regard to its own functionality as well as capable of functioning as a 'large' component, comprehensively encapsulating the application area of image processing. Using operating system standards for such extensions allows programmers as well as other applications simple and general access to the capabilities of the system.

AN IMAGE PROCESSING TOOL Based on these considerations, the NeuroCheck image processing tool has been designed as a universal, extensible system which can be used as a component providing powerful, highly integrated image processing functionality through its OLE Automation interface.

Image processing applications are developed completely inside the tool in point and click fashion with permanent visual feedback to the user. The system duplicates as the runtime environment. This means that it neither generates code which would have to be integrated into other systems, nor does it interpret a script program- with the typical

66 A universal image processing system must be extensible with regard to its own functionality as

' well as capable of functioning as 1 a 'large' component 99

-_- I

performance loss of interpreter systems. The inspection routine is executed with the full performance of compiled library functions, while at the same time the integrated concept provides the full comfort of the graphical user interface for optimising the application and adapting it to changing requirements.

The software has been specifically designed for industrial inspection systems. The required production line integration ~ for example, through digital or serial interfaces - is therefore already part of the program frame, as are standardised data output capabilities for quality management systems and built-in diagnostic features. All important application areas of industrial visnal inspection, like presence verification, bar code identification, measuring, character recognition, surface inspection or colour processing, are covered.

Specific requirements of individual applications which cannot be solved using the built-in functionality can be met through a DLL interface which also allows to use OCX components or routines from third-party libraries. Since the programmer can make use of the entire application logic of the program frame, he can fnlly concentrate on the algorithmic solution of the specific problem. This plug-in DLL-interface has already been used for very different types of functions, such as complex mathematical evaluations, incorporation of data from other sensor systems, and control of industrial robots.

On the other end, the OLE interface allows NenroCheck to be used as a component in a larger system. Again, the task of the programmer is much simpler than in the case of integrating manifold small components. The entire image processing is performed fully encapsulated inside the software -the programmer only has to collect the data required by the overall system for further processing. The OLE interface has been used for example to couple it to a data base for address verification on label printers and to build a control structure for a complex inspection system with several individual stations. W

Earl Yardley. Industrial Vision Systems Ltd, may be reached at [email protected]

18 IEE Computing 8 Control Engineering I Decemberllanuary 2004l05