Appearance inspection system, image processing device, imaging device, and inspection method

An appearance inspection system includes a setting part, a movement mechanism, and a control part. The setting part sets a route passing through a plurality of imaging positions in order. The setting part sets the route so that a first time necessary for the movement mechanism to move an imaging device from a first imaging position to a second imaging position among the plurality of imaging positions is longer than a second time necessary for a process of changing a first imaging condition corresponding to the first imaging position to a second imaging condition corresponding to the second imaging position by the control part. The control part starts the process of changing the first imaging condition to the second imaging condition earlier by the second time or more than a scheduled time at which the imaging device arrives at the second imaging position.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims the priority of Japan patent application serial no. 2018-044035, filed on Mar. 12, 2018. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of this specification.

BACKGROUND

Technical Field

The disclosure relates to an appearance inspection system inspecting a target using a captured image and an image processing device, an imaging device, and an inspection method used in the appearance inspection system.

Description of Related Art

Many appearance inspection systems inspecting targets such as resins, metals, and the like using image processing technologies have been proposed.

For example, Japanese Laid-Open No. 2007-248241 (Patent Document 1) discloses an inspection device including an imaging device that images a target, an illumination device that illuminates a field of view of the imaging device, a support device that supports a position and a posture of the target or the imaging device to be changeable, a control device that controls operations of the imaging device and the support device, and an image processing device that performs image processing to take an image generated by the imaging device under illumination of the illumination device for inspection. The control device generates setting information indicating a relation between the imaging device and the target which is satisfied at the time of imaging in imaging performed on the target a plurality of times. Japanese Laid-Open No. 2007-240434 (Patent Document 2) discloses a similar technology.

RELATED ART DOCUMENT(S)

In the above-described inspection devices of the related arts, optimization of an imaging position and a posture is performed for each inspection target position on a target, but a change in an imaging condition (for example, a zoom magnification) when sequentially imaging a plurality of inspection target positions is not considered. When the imaging condition is changed for each inspection target position, the imaging condition is considered to be changed after arrival at an imaging position corresponding to the inspection target position. However, when the imaging condition is changed after the arrival at the imaging position, an inspection time may lengthened since an operation of the imaging device is temporarily stopped.

SUMMARY

According to an example of the disclosure, an appearance inspection system performs appearance inspection by causing an imaging device to image a target when the imaging device arrives at each of a plurality of imaging positions set for the target while moving a relative position of the imaging device with respect to the target. The appearance inspection system includes a setting part, a movement mechanism, and a control part. The setting part sets a route passing through the plurality of imaging positions in order. The movement mechanism moves the relative position of the imaging device with respect to the target along the route. The control part controls an imaging condition of the imaging device. The setting part sets the route so that a first time necessary for the movement mechanism to move the imaging device from a first imaging position to a second imaging position among the plurality of imaging positions is longer than a second time necessary for a process of changing a first imaging condition corresponding to the first imaging position to a second imaging condition corresponding to the second imaging position by the control part. The control part starts the process of changing the first imaging condition to the second imaging condition earlier by the second time or more than a scheduled time at which the imaging device arrives at the second imaging position when the movement mechanism moves the imaging device from the first imaging position to the second imaging position.

According to an example of the disclosure, in an inspection method, appearance inspection is performed by causing an imaging device to image a target when the imaging device arrives at each of a plurality of imaging positions set for the target while moving the imaging device. The inspection method includes setting a route passing through the plurality of imaging positions in order; and moving a relative position of the imaging device with respect to the target along the route and controlling an imaging condition of the imaging device. In the setting of the route, the route is set so that a first time necessary for moving the imaging device from a first imaging position to a second imaging position among the plurality of imaging positions is longer than a second time necessary for a process of changing a first imaging condition corresponding to the first imaging position to a second imaging condition corresponding to the second imaging position. In the controlling of the imaging condition, the process of changing the first imaging condition to the second imaging condition starts earlier by the second time or more than a scheduled time at which the imaging device arrives at the second imaging position.

DESCRIPTION OF THE EMBODIMENTS

An objective of the disclosure is to provide an appearance inspection system capable of shortening an inspection time at the time of imaging of a target from a plurality of imaging positions and an image processing device, an imaging device, and an inspection method used in the appearance inspection system.

According to the example of the disclosure, when the imaging device arrives at the imaging position, the imaging condition of the imaging device is changed to the imaging condition corresponding to the imaging position simultaneously or before the arrival. Therefore, when the imaging device arrives at the imaging position, the imaging by the imaging device can be performed instantly. As a result, it is possible to shorten the inspection time when the target is imaged from the plurality of imaging positions.

According to the above-described example of the disclosure, the appearance inspection system may further include an estimation part that estimates the second time based on pre-decided information indicating a correlation between an imaging condition before a change and an imaging condition after the change, and a time necessary for a process of changing the imaging condition before the change to the imaging condition after the change. According to the example of the disclosure, it is possible to easily estimate the second time based on the information indicating the correlation.

According to the above-described example of the disclosure, the appearance inspection system may further include a notification part that performs error notification when the control part is not able to complete the process of changing the first imaging condition to the second imaging condition by the scheduled time. According to the example of the disclosure, the user can recognize abnormality in the imaging device10and perform an appropriate countermeasure such as maintenance.

According to the above-described example of the disclosure, the control part may output a first state signal indicating that an instruction to change an imaging condition of the imaging device is not receivable while the process of changing the first imaging condition to the second imaging condition is performed. According to the example of the disclosure, by checking the first state signal, it is possible to easily recognize the state of the imaging device.

According to the above-described example of the disclosure, the control part may output a second state signal indicating that an imaging instruction to the imaging device is not receivable while the process of changing the first imaging condition to the second imaging condition is performed. According to the example of the disclosure, by checking the second state signal, it is possible to easily recognize the state of the imaging device.

According to an example of the disclosure, an image processing device that is used in the appearance inspection system and determines quality of an appearance of the target by processing an image captured by the imaging device includes the estimation part. Alternatively, an image processing device that is used in the appearance inspection system and determines quality of an appearance of the target by processing an image captured by the imaging device includes at least one of the setting part and the control part. According to the example of the disclosure, the image processing device can determine the quality of the appearance of the target and perform at least some of the processes of setting the designation route.

According to an example of the disclosure, an imaging device that is used in the appearance inspection system includes the estimation part. Alternatively, an imaging device that is used in the appearance inspection system includes at least one of the setting part and the control part. According to the example of the disclosure, the imaging device can image the target and at least execute some of the processes of setting the designation route.

According to the example of the disclosure, it is possible to shorten the inspection time when the target is imaged from the plurality of imaging positions.

According to the example of the disclosure, it is possible to shorten the inspection time when the target is imaged from the plurality of imaging positions.

Embodiments of the disclosure will be described in detail with reference to the drawings. The same reference signs are given to the same or equivalent portions in the drawings and the description thereof will not be repeated.

1. Application Example

First, an example of a scene to which the disclosure is applied will be described with reference toFIG. 1.FIG. 1is a schematic view illustrating an overview of an appearance inspection system according to an embodiment.

An appearance inspection system1according to the embodiment images a plurality of inspection target positions on a workpiece W placed on a stage90and inspects the appearance of the workpiece W using the obtained images in, for example, a production line or the like industrial products. In the appearance inspection, injuries, stains, presence or absence of foreign substances, dimensions, and the like of the workpiece W are inspected.

When the appearance inspection of the workpiece W place on the stage90is completed, a subsequent workpiece W is transported on the stage90. At this time, the workpiece W is placed at a pre-decided posture at a pre-decided position on the stage90.

As illustrated inFIG. 1, the appearance inspection system1includes an imaging device10, an image processing device20, a robot30, a robot controller40, a programmable logic controller (PLC)50, and an information processing device60.

The imaging device10images a subject which is within an imaging field of view in response to an imaging trigger (imaging instruction) from the image processing device20to generate image data and images the workpiece W which is an appearance inspection target as a subject. An imaging condition of the imaging device10is variable.

The information processing device60is a device that performs various kinds of information processing. The information processing device60includes an imaging position decision unit64, an imaging condition decision unit65, and a setting part67.

The imaging position decision unit64decides a position (imaging position) and a posture of the imaging device10corresponding to each of a plurality of inspection target positions on the workpiece W.

The imaging condition decision unit65decides an imaging condition for imaging a corresponding inspection target position from the imaging position with regard to each of a plurality of imaging positions. Examples of the imaging condition include a focus position, a zoom magnification (focal distance), a diaphragm, a shutter speed, a resolution, a gain, and an illumination luminescent color.

The setting part67sets a route (designation route) of the imaging device10passing through the plurality of imaging positions in order.

The imaging position decision unit64, the imaging condition decision unit65, and the setting part67decide an imaging position and an imaging condition, and a designation route appropriate for the workpiece W when it is necessary to inspect the appearance of a new product or a new type of workpiece W, respectively.

The robot30is a movement mechanism that moves the imaging device10and is, for example, a vertically articulated robot in which a plurality of arms32ato32fon a base31are connected. The robot30includes six rotational shafts33ato33f. The arm32aand the arm32bare connected by the rotational shaft33a. The arm32band the arm32care connected by the rotational shaft33b. The arm32cand the arm32dare connected by the rotational shaft33c. The arm32dand the arm32eare connected by the rotational shaft33d. The arm32eand the arm32fare connected by the rotational shaft33e. The arm32fand the base31are connected by the rotational shaft33f. The imaging device10is mounted at the distal end of the arm32a. The robot controller40controls the robot30such that the imaging device10is located at coordinate values instructed from the PLC50and changes a relative position of the imaging device10with respect to the workpiece W. Further, the robot controller40controls the robot30to change the posture of the imaging device10with respect to the workpiece W so that an optical axis of the imaging device10matches in a direction instructed from the PLC50.

As described above, the workpiece W is placed at the pre-decided posture at the pre-decided position on the stage90. Therefore, the robot30can change the relative position and the posture of the imaging device10with respect to the workpiece W by changing the relative position and the posture of the imaging device10with respect to the stage90. That is, the robot30can change the relative position and the posture of the imaging device10with respect to the workpiece W by moving the imaging device10using a coordinate system in which a point on the stage90is the origin.

The PLC50controls the robot controller40and the image processing device20such that the imaging device10sequentially performs imaging at the plurality of imaging positions. The PLC50controls the robot controller40such that the imaging device10is continuously moved along a designation route set by the setting part67. Thus, the robot30moves continuously the imaging device10along the designation route.

Further, the PLC50controls the image processing device20such that an imaging trigger is output at a timing at which the imaging device10arrives at the imaging position. Thus, the plurality of inspection target positions can be sequentially imaged while continuously moving the imaging device10.

The image processing device20outputs an imaging trigger to the imaging device10in response to an instruction from the PLC50when the imaging device10arrives at the imaging position. The image processing device20acquires image data generated by the imaging device10. The image processing device20determines quality of the appearance of the workpiece W by performing a process decided in advance on the acquired image data.

The image processing device20outputs an instruction to change the imaging condition (a condition changing instruction) into an imaging condition corresponding to a subsequent imaging position in response to an instruction from the PLC50to the imaging device10when an exposure process of the imaging device10is completed. Information indicating the imaging condition corresponding to the subsequent imaging position is added to the condition changing instruction.

FIG. 2is a diagram illustrating an example of an internal configuration of an imaging device. As illustrated inFIG. 2, the imaging device10includes an illumination part11, a lens module12, an image sensor13, an image sensor control part14, a lens control part16, registers15and17, and a communication I/F part18.

The illumination part11radiates light to the workpiece W. The light radiated from the illumination part11is reflected from the surface of the workpiece W and is incident on the lens module12.

The illumination part11may include a plurality of illumination elements which are each controlled to be turned on independently. In this case, the imaging condition may include an illumination pattern indicating an illumination element which is turned on among the plurality of illumination elements.

The lens module12forms the light reflected from the workpiece W on the image sensor13. The lens module12includes a focus position adjustment lens12a, a zoom adjustment lens group12b, a fixed lens12c, and a movable part12d. The focus position adjustment lens12ais a lens that changes a focus position. The zoom adjustment lens group12bis a lens group that adjusts a zoom magnification by changing a focal distance. The zoom adjustment lens group12bis installed in the movable part12dand is movable in an optical axis direction. The fixed lens12cis a lens that is fixed at a pre-decided position inside the imaging device10. In the example illustrated inFIG. 2, the focus position adjustment lens12a, the zoom adjustment lens group12b, and the fixed lens12care arranged in this order. However, the arrangement order of the focus position adjustment lens12a, the zoom adjustment lens group12b, and the fixed lens12care not limited thereto.

The image sensor13is, for example, a photoelectric conversion element such as a complementary metal oxide semiconductor (CMOS) image sensor and converts light from the imaging field of view into an image signal.

The image sensor control part14performs an imaging process when an imaging trigger is received from the image processing device20via the communication I/F part18. At this time, the image sensor control part14controls a shutter (not illustrated) such that a shutter speed (exposure time) corresponding to the imaging position is achieved. The shutter may be either a mechanical shutter or an electronic shutter. Information indicating the shutter speed corresponding to the imaging position is stored in advance in the register15. The image sensor control part14generates image data based on an amount of charge accumulated in the image sensor13and outputs the generated image data to the image processing device20via the communication I/F part18.

When a condition changing instruction is received from the image processing device20via the communication I/F part18, the image sensor control part14updates the information indicating the shutter speed stored by the register15to information indicating a shutter speed corresponding to a subsequent imaging position in accordance with information added to the condition changing instruction.

The lens control part16controls optical characteristics of the lens module12in response to a command stored by the register17. For example, the lens control part16controls the focus position adjustment lens12asuch that the focus position is a focus position corresponding to the subsequent imaging position. Further, the lens control part16controls the movable part12dand adjusts the position of the zoom adjustment lens group12bso that the zoom magnification is a zoom magnification corresponding to the subsequent imaging position.

When a condition changing instruction is received from the image processing device20via the communication I/F part18, the lens control part16updates the information indicating the focus position and the zoom magnification stored by the register17in accordance with information added at the time of the condition changing instruction and starts a process of changing the focus position and the zoom magnification.

FIG. 3is a diagram illustrating an example of a designation route set by the information processing device. As illustrated inFIG. 3, the imaging position decision unit64of the information processing device60decides imaging positions C1and C2corresponding to the inspection target positions B1and B2on the workpiece W. The imaging condition decision unit65decides an imaging condition D1for imaging the inspection target position B1from the imaging position C1with regard to the imaging position C1. Similarly, the imaging condition decision unit65decides an imaging condition D2for imaging the inspection target position B2from the imaging position C2with regard to the imaging position C2.

The setting part67sets the designation route A passing through the imaging positions C1and C2in order. The setting part67sets the designation route A so that a time T1necessary to move the imaging device10from the imaging position C1to the imaging position C2is longer than a time T2necessary for a process of changing the imaging condition D1to the imaging condition D2by the image sensor control part14and the lens control part16.

The image sensor control part14and the lens control part16starts the process of changing the imaging condition D1to the imaging condition D2earlier by the time T2or more than a scheduled time at which the imaging device10arrives at the imaging position C2when the imaging device10is moved along the designation route A. In the example illustrated inFIG. 3, the image sensor control part14and the lens control part16start the process of changing the imaging condition D1to the imaging condition D2when the imaging device10arrives at a position C1_1. A time necessary to move the imaging device10from the position C1_1to the imaging position C2along the designation route A is the time T2or more.

According to the configuration of the embodiment, when the imaging device10arrives at the imaging position C2, the imaging condition of the imaging device10is changed to the imaging condition D2corresponding to the imaging position C2simultaneously or before the arrival. In the example illustrated inFIG. 3, the process of changing the imaging condition D1to the imaging condition D2is completed when the imaging device10arrives at the position C1_2before the imaging position C2. Therefore, when the imaging device10arrives at the imaging position C2, it is possible to instantly perform imaging of the inspection target position B2by the imaging device10. As a result, it is possible to shorten an inspection time in the case of imaging from the plurality of imaging positions on the workpiece W.

2. Specific Example

Next, an example of the appearance inspection system according to the embodiment will be described.

FIG. 4is a diagram illustrating an example of a focus position adjustment lens. In the example illustrated inFIG. 4, the focus position adjustment lens12ais a liquid lens and includes a transparent container70, electrodes73a,73b,74a, and74b, insulators75aand75b, and insulation layers76aand76b.

A closed space in the transparent container70is filled with a conductive liquid71such as water and an insulation liquid72such as oil. The conductive liquid71and the insulation liquid72are not mixed and have mutually different refractive indexes.

The electrodes73aand73bare fixed between the insulators75aand75band the transparent container70, respectively, and are located in the conductive liquid71.

The electrodes74aand74bare disposed near an end of an interface between the conductive liquid71and the insulation liquid72. The insulation layer76ais interposed between the insulation liquid72and the conductive liquid71and the electrode74a. The insulation layer76bis interposed between the insulation liquid72and the conductive liquid71and the electrode74b. The electrodes74aand74bare disposed at a position symmetric to an optical axis of the focus position adjustment lens12a.

When a voltage Va is applied between the electrodes74aand73a, the conductive liquid71is pulled by the electrode74a. Similarly, when a voltage Vb is applied between the electrodes74band73b, the conductive liquid71is pulled by the electrode74b. Thus, a curvature of the interface between the conductive liquid71and the insulation liquid72is changed. Since the refractive indexes of the conductive liquid71and the insulation liquid72are different, a focus position of the focus position adjustment lens12ais changed when the curvature of the interface between the conductive liquid71and the insulation liquid72is changed. The curvature of the interface depends on magnitudes of the voltages Va and Vb. Therefore, by changing the magnitudes of the voltages Va and Vb, it is possible to adjust the focus position of the focus position adjustment lens12ato a desired position.

Normally, the voltages Va and Vb are controlled to an equal value. Thus, the interface between the conductive liquid71and the insulation liquid72is changed to be symmetric to the optical axis. However, the voltages Va and Vb may be controlled to different values. Thus, the interface between the conductive liquid71and the insulation liquid72may be asymmetric to the optical axis and a direction of the imaging field of view of the imaging device10can be changed.

FIG. 5is a diagram illustrating another example of the focus position adjustment lens. The focus position adjustment lens12ain the example illustrated inFIG. 5is supported by a slide member77parallel to the optical axis and is movable along the slide member77. By changing the position of the focus position adjustment lens12a, it is possible to adjust the focus position of the focus position adjustment lens12ato a desired position.

(B. Image Sensor Control Part and Lens Control Part)

The image sensor control part14and the lens control part16include, for example, microcomputers and perform control processes on the image sensor13and the lens module12, respectively.

Further, the image sensor control part14and the lens control part16switch states of a READY1 signal and a READY2 signal (an ON state or an OFF state) output from the imaging device10to the image processing device20. The READY1 signal is a signal indicating whether the imaging device10can receive a condition changing instruction. The READY2 signal is a signal indicating whether the imaging device10can receive an imaging trigger. The ON state indicates that the signal is not receivable and the OFF state indicates that the signal is receivable.

The image sensor control part14performs an imaging process when an imaging trigger is received, as described above. The imaging process includes, for example, a process of opening the shutter (not illustrated) (an exposure process) and an image generation process. The image generation process includes a process of reading an amount of charges of each pixel of the image sensor13, a process of performing A/D conversion on the amount of charges, a process of generating image data in which luminance calculated based on the amount of charges is arranged for each pixel, and a process of transmitting the image data to the image processing device20via the communication I/F part18.

The image sensor control part14switches the READY2 signal to the ON state while the imaging process is performed.

When the condition changing instruction is received from the image processing device20, as described above, the lens control part16controls the focus position adjustment lens12aand the movable part12din accordance with information added to the condition changing instruction.

The lens control part16switches the READY1 signal and the READY2 signal to the ON state while the focus position and the zoom magnification are being changed by controlling the focus position adjustment lens12aand the movable part12d.

(C. Internal Configuration of Information Processing Device)

FIG. 6is a block diagram illustrating an example of an internal configuration of the information processing device. The information processing device60in the example illustrated inFIG. 6includes a display part61, a storage part62, an inspection position decision part63, and an estimation part66in addition to the imaging position decision unit64, the imaging condition decision unit65, and the setting part67. The display part61is, for example, a touch panel. The storage part62is, for example, an auxiliary storage device such as a hard disk drive or a solid-state drive and stores processing programs to be executed by the inspection position decision part63, the imaging position decision unit64, the imaging condition decision unit65, the estimation part66, and the setting part67and data indicating information regarding setting of the designation route, and the like.

The inspection position decision part63reads 3-dimensional design data (for example, computer-aided design (CAD) data) indicating the designed surface of the workpiece W stored in the storage part62and decides a plurality of inspection target positions on the surface indicated by the 3-dimensional setting data in accordance with an input by a user.

With regard to each of the plurality of inspection target positions decided by the inspection position decision part63, the imaging position decision unit64decides a position (imaging position) and a posture of the imaging device10which can be imaged in focus on the inspection target position. Further, the imaging position decision unit64decides an order in which the imaging device passes through the plurality of imaging positions.

The imaging position decision unit64decides imaging positions in a movable range of the imaging device10based on the shape of the workpiece W and an obstacle object near the workpiece W. For example, when a depression is formed on the surface of the workpiece W and an inspection target position is decided on the bottom of the depression, the imaging position decision unit64decides the imaging positions so that a portion around the depression on the workpiece W does not interfere with the imaging device10. Further, when there is an obstacle object near the workpiece W, the imaging position decision unit64decides the imaging positions so that the obstacle object does not interfere with the imaging device10. When the user inputs information (coordinate values) indicating a location of the obstacle object to the information processing device60, the imaging position decision unit64can recognize the location of the obstacle object.

The imaging condition decision unit65decides an imaging condition for imaging a corresponding inspection target position from the imaging position with respect to each imaging position decided by the imaging position decision unit64. For example, the imaging condition decision unit65decides the imaging condition based on a distance between the imaging position and the corresponding inspection target position, the shape of the workpiece W, or the like.

The estimation part66estimates a time T2_inecessary for a process of changing an imaging condition Di corresponding to an i-th imaging position Ci to an imaging condition D(i+1) corresponding to an (i+1)-th imaging position C(i+1). A process of changing various parameters included in the imaging condition is performed in parallel. Since a change in a shutter speed and a resolution does not involve a physical change, the change in the shutter speed and the resolution is generally performed in a short time. On the other hand, since a change in a focus position and a zoom magnification involves a physical change, it takes some time. Therefore, the time T2_inecessary for the process of changing the imaging condition Di to the imaging condition D(i+1) is a time which is the longest in the time necessary to change the various parameters.

E is an environment variable and is, for example, temperature or humidity. The estimation part66may acquire a measurement value measured by a temperature and humidity meter (not illustrated) installed in the imaging device10as a value of E. A function f may be derived theoretically or may be derived experimentally. When the function f is derived experimentally, a correspondent relation between T2_iand a combination of various Di, D(i+1), and E are experimentally obtained and an approximation expression indicating the correspondent relation is set as the function f. The estimation part66may estimate the time T2_iusing a table instead of Expression (1).

Further, the estimation part66estimates a time T3_inecessary for an imaging process corresponding to the imaging condition Di.

The time T3_ilargely depends on a shutter speed and a resolution. Therefore, the estimation part66estimates the time T3_ibased on, for example, the shutter speed and the resolution indicated by the imaging condition Di. The estimation part66may estimate the time T3_iusing a function expression as in the time T2and may estimate the time T3_iusing a table.

The setting part67sets a designation route along which the imaging device10passes through imaging positions C1to CN in order so that the time T1_iin which the imaging device10is moved from the imaging position Ci to the imaging position C(i+1) satisfies both T1_i>T2_iand T1_i>T3_i.

The setting part67optimizes a route so that a value obtained by a preset evaluation function is the minimum (or the maximum) and sets the route as a designation route. The setting part67sets the designation route using a method such as a probabilistic road map (PRM), a rapidly exploring random tree (RRT), or particle swarm optimization (PSO) as an optimization technique.

The setting part67generates information indicating the set designation route. The information indicating the designation route includes XYZ coordinate values and θx, θy, and θz corresponding to each point on the designation route along which the imaging device passes for each given time, XYZ coordinate values and θx, θy, and θz corresponding to each imaging position, and information indicating an imaging condition corresponding to each imaging position. The XYZ coordinate values are coordinate values in an XYZ coordinate system that has a point on the stage90as the origin. θx is an angle formed between the X axis and a line obtained by projecting the optical axis of the imaging device10to the XY plane, θy is an angle formed between the Y axis and a line obtained by projecting the optical axis of the imaging device10to the YZ plane, and θz is an angle formed between the Z axis and a line obtained by projecting the optical axis of the imaging device10to the ZX plane. The setting part67may decide θx, θy, and θz indicating a posture of the imaging device10at each point between an i-th imaging position and an i+1-th imaging position on the designation route by interpolation calculation performed using θxi, θyi, and θzi corresponding to the i-th imaging position and θx(i+1), θy(i+1), and θz(i+1) corresponding to the i+1-th imaging position.

(D. Hardware Configuration of Information Processing Device)

FIG. 7is a schematic diagram illustrating a hardware configuration of the information processing device. The information processing device60includes a central processing unit (CPU)162, a main memory163, a hard disk164, a display166, an input device167, and a communication interface (I/F)168. These units are connected to be able to mutually perform data communication via a bus161.

The CPU162performs various arithmetic calculations by loading programs (codes) including the processing program165installed in the hard disk164on the main memory163and executing the programs in a predetermined order. The main memory163is generally a volatile storage device such as a dynamic random access memory (DRAM).

The hard disk164is an internal memory included in the information processing device60and a nonvolatile storage device and stores various programs such as the processing program165. A semiconductor storage device such as a flash memory may be adopted in addition to or instead of the hard disk164.

The processing program165is a program indicating a procedure of processing by the information processing device60. Various programs such as the processing program165may not be necessarily stored in the hard disk164and may be stored in a server that can communicate with the information processing device60or an external memory which can be directly connected to the information processing device60. For example, various programs to be executed by the information processing device60and various parameters to be used in the various programs are distributed in a stored state in the external memory, and the information processing device60reads the various programs and the various parameters from the external memory. The external memory is a medium that stores information such as a program recorded on a computer, another device, a machine, or the like by an electric, magnetic, optical, mechanical, or chemical target operation so that the information is readable. Alternatively, programs or parameters downloaded from a server or the like which is connected to be communicable with the information processing device60may be installed in the information processing device60.

The display166is, for example, a liquid crystal display. The input device167includes, for example, a mouse, a keyboard, a touchpad, or the like.

The communication I/F168exchanges various kinds of data between the PLC50and the CPU162. The communication I/F168may exchange data between the server and the CPU162. The communication I/F168includes hardware corresponding to a network for exchanging various kinds of data with the PLC50.

The display part61illustrated inFIG. 6includes the display166. The storage part62illustrated inFIG. 6includes the main memory163or the hard disk164. The inspection position decision part63, the imaging position decision unit64, the imaging condition decision unit65, the estimation part66, and the setting part67illustrated inFIG. 6are realized by the CPU162, the main memory163, and the hard disk164.

The processing program165according to the embodiment may be embedded in a part of another program to be provided. Instead, some or all of the processes provided by executing the processing program165may be performed by a dedicated hardware circuit.

(E. Flow of Example of Process in Information Processing Device)

FIG. 8is a flowchart illustrating an example of a flow of a process in the information processing device. When it is necessary for the appearance inspection system1to inspect the appearance of a new product or a new type of workpiece W, the information processing device60performs a process in accordance with, for example, the flowchart illustrated inFIG. 8to set a designation route of the imaging device10appropriate for the new product or the new type of workpiece W. The storage part62may store 3-dimensional design data indicating the designed surface of the new product or the new type of workpiece W in advance.

In the example illustrated inFIG. 8, in step S1, the inspection position decision part63first decides a plurality of inspection target positions on the workpiece W. Subsequently, in step S2, the imaging position decision unit64decides a position (imaging position) and a posture of the imaging device10with regard to each of the plurality of inspection target positions. Subsequently, in step S3, the imaging position decision unit64decides an order in which the imaging device passes through the plurality of imaging positions. For example, the imaging position decision unit64decides a position closest to a default position of the imaging device10among the plurality of imaging positions as a first imaging position. The imaging position decision unit64decides an imaging position closest to an i-th imaging position (where i is an integer equal to or greater than 1) along the surface of the workpiece W among the imaging positions other than imaging positions up to the i-th imaging position among the plurality of imaging positions as an (i+1)-th imaging position.

Subsequently, in step S4, the imaging condition decision unit65decides an imaging condition corresponding to each imaging position.

Subsequently, in step S5, under the imaging condition corresponding to each imaging position, the estimation part66estimates the time T3necessary for the imaging process at the time of the imaging of the imaging condition. In step S6, the estimation part66outputs the time T2necessary for the process of changing the imaging condition corresponding to the previous imaging position to the imaging condition corresponding to the subsequent imaging position with regard to two consecutive imaging positions in the passing order.

Subsequently, in step S7, the setting part67generates a plurality of route candidates for passing the imaging positions in the passing order decided in step S3. At this time, the setting part67generates the plurality of route candidates so that the time T1in which the imaging device10is moved from the previous imaging position Ci to the subsequent imaging position with regard to two consecutive imaging positions in the passing order satisfies both T1>T2and T1>T3. In step S8, the setting part67sets a route candidate in which the evaluation value is the minimum (or the maximum) among the plurality of route candidates as the designation route and generates information indicating the set designation route.

(F. Method of Deciding Inspection Target Position by Inspection Position Decision Part)

FIG. 9is a diagram illustrating an example of a screen showing a schematic diagram of the designed appearance of the workpiece W. The inspection position decision part63causes the display part61to display a screen61aincluding a schematic diagram W0of the designed appearance indicated by the 3-dimensional design data. The screen61aincludes a tool button81for rotating the schematic diagram W0using the vertical direction as an axis and a tool button82for rotating the schematic diagram W0using the horizontal direction as an axis. The user can appropriately rotate the schematic diagram W0by operating the tool buttons81and82.

The inspection position decision part63receives a designation of a position which the user desires to inspect. Specifically, the user uses the input device167to click a plurality of points which the user desires to inspect on the schematic diagram W0of the workpiece W. The inspection position decision part63decides the plurality of points designated on the schematic diagram W0as a plurality of inspection target positions and finds coordinates of the plurality of inspection target positions. In the example illustrated inFIG. 9, inspection target positions B1to B3are decided.

The inspection position decision part63converts a coordinate system of the 3-dimensional design data into an XYZ coordinate system that has a point on the stage90as the origin on the premise that the workpiece W is placed at a posture decided in advance at a position decided in advance on the stage90. Therefore, the inspection target position indicates XYZ coordinate values of the XYZ coordinate system that has the point on the stage90as the origin.

(G. Method of Deciding Imaging Position by Imaging Position Decision Unit)

The imaging position decision unit64decides, for example, one position within a range satisfying Conditions (1) to (4) below as an imaging position with regard to an inspection target position. The imaging position decision unit64decides a posture of the imaging device10so that a direction oriented from the imaging position to the inspection target position matches the optical axis of the imaging device10:

Condition (1): a normal line of the surface of the workpiece W passing through the inspection target position or a line inclined by a predetermined angle (for example, 20°) from the normal line. The predetermined angle is set appropriately in accordance with disposition or the like of the illumination part11, the lens module12, and the image sensor13in the imaging device10;

Condition (2): an image in which the inspection target position is in focus can be captured by adjusting a focus position by the focus position adjustment lens12a;

Condition (3): within a movable range by the robot30; and

Condition (4): a range with a predetermined size including the inspection target position can be set as an imaging field of view by adjusting the zoom magnification by the zoom adjustment lens group12b.

The imaging position decision unit64may decide any one position selected from a plurality of positions arranged as the imaging position when there are a plurality of positions satisfying Conditions (1) to (4). Alternatively, the imaging position decision unit64may decide a position closest to the inspection target position of the plurality of positions as the imaging position. Alternatively, the imaging position decision unit64decides a position with middle coordinate values among the plurality of positions as the imaging position.

FIG. 10is a diagram illustrating an example of an imaging position decided by an imaging position decision unit.FIG. 10illustrates imaging positions C1to C3decided for the inspection target positions B1to B3illustrated inFIG. 9.

An imaging position is indicated with XYZ coordinate values of the XYZ coordinate system that has a point on the stage90as the origin. A posture of the imaging device10is indicated by the parameters θx, θy, and θz for specifying the direction of the optical axis of the imaging device10.

Further, the imaging position decision unit64decides a passing order by setting the imaging position C1closest to the default position of the imaging device10as the first imaging position, setting the imaging position C2closest to the imaging position C1as the second imaging position, and setting the remaining imaging position C3as the third imaging position.

(H. Method of Deciding Imaging Condition by Imaging Condition Decision Unit)

The imaging condition decision unit65decides, for example, a higher zoom magnification as a distance between the imaging position and the inspection target position is longer.

The imaging condition decision unit65may decide the zoom magnification for each inspection target position in accordance with an inspection item. For example, the imaging condition decision unit65decides a zoom magnification of the inspection target position at which a screw mounting state is set as an inspection item as a relatively low value and decides a zoom magnification of the inspection target position at which a coating hurt is set as an inspection item as a relatively high value. The imaging condition decision unit65may decide the zoom magnification in accordance with the inspection item input by the user for each inspection target position.

Further, the imaging condition decision unit65may decide a resolution in accordance with the zoom magnification. Further, the imaging condition decision unit65may decide a focus position in accordance with a distance between the imaging position and the inspection target position. Further, when a part of the workpiece W is between the illumination part11and the inspection target position, since an amount of illumination light arriving at the inspection target position is decreased, the imaging condition decision unit65may decide a shutter speed slower than the default (may decide an exposure time longer than the default).

(I. Method of Setting Designation Route by Setting Part)

As described above, the setting part67optimizes the route so that a value obtained by a pre-decided evaluation function is the minimum (or the maximum) and sets the designation route. The evaluation function is, for example, a first function indicating a time necessary to pass through all the imaging positions, a second function indicating a spatial length of the route, or a third function indicating a variation amount of a speed of the imaging device10. By using the first function, the setting part67can set a designation route in which a movement time is short or a designation route in which the movement time is the closest to a desired time. By using the second function, the setting part67can set a designation route in which a movement amount is small. By using the third function, the setting part67can set a designation route in which the imaging device10can be moved at a substantially constant speed.

FIG. 11(a)andFIG. 11(b)are diagrams illustrating an example of a designation route set by a setting part.FIG. 11(a)illustrates a designation route A1set based on an evaluation value calculated using the first function.FIG. 11(b)illustrates a designation route A2set based on an evaluation value calculated using the third function.

The designation route A1in which the imaging positions C1to C3are connected smoothly and at a short distance is set by optimizing the route so that the evaluation value calculated using the first function is the minimum, as illustrated inFIG. 11(a). However, to ensure the time T2_1in which the imaging condition D1is changed to the imaging condition D2, it is necessary to lower a speed of the imaging device10from the imaging position C1to the imaging position C2.

On the other hand, the designation route A2in which a route length from the imaging position C1to the imaging position C2is long is set by optimizing the route so that the evaluation value calculated using the third function is the minimum, as illustrated inFIG. 11(b). The designation route A2is lengthy at a glance. However, after the imaging device10passes through the imaging position C2while maintaining a substantially constant movement speed, the imaging device10can smoothly move toward the imaging position C3.

The PLC50acquires information indicating the designation route generated by the information processing device60and outputs instruction in accordance with the information to the image processing device20and the robot controller40.

The PLC50instructs the robot controller40of θx, θy, and θz and the XYZ coordinates of each point on the designation route through which the imaging device passes for each given time and which is included in information indicating the designation route generated by the information processing device60sequentially at a constant time interval. Thus, the robot controller40and the robot30move the imaging device10to the position of the instructed XYZ coordinate values and change the posture of the imaging device10so that the optical axis matches the direction indicated by the instructed θx, θy, and θz.

The PLC50acquires the XYZ coordinate values and θx, θy, and θz indicating the actual position and posture of the imaging device10from the robot30and compares the acquired XYZ coordinate values and θx, θy, and θz with the XYZ coordinate values and θx, θy, and θz of the imaging position. The PLC50outputs information indicating the imaging condition corresponding to the subsequent imaging position and an imaging instruction to the image processing device20at a timing at which the XYZ coordinate values and θx, θy, and θz acquired from the robot match the XYZ coordinate values and θx, θy, and θz of the imaging position.

The image processing device20includes a central processing unit (CPU), a random access memory (RAM), a read-only memory (ROM), an auxiliary storage device, and a communication I/F and performs information processing. The auxiliary storage device includes, for example, a hard disk drive, a solid-state drive, or the like and stores a program or the like to be executed by the CPU.

FIG. 12is a block diagram illustrating an internal configuration of the image processing device. As illustrated inFIG. 12, the image processing device20includes an instruction unit21, a determination unit22, a determination result output unit23, and a notification part24.

The instruction unit21outputs an imaging trigger to the imaging device10when an imaging instruction is received from the PLC50.

Further, the instruction unit21outputs a condition changing instruction to the imaging device10at a timing that has passed by a pre-decided time after the imaging trigger is output to the imaging device10. The pre-decided time is a time equal to or greater than a time in which the imaging device10completes an exposure process after the imaging trigger is output. Information indicating an imaging condition corresponding to a subsequent imaging position and received from the PLC50is added to the condition changing instruction.

The determination unit22processes an image captured with regard to an inspection target position and outputs a quality determination result of the inspection target position. For example, the determination unit22determines quality of the inspection target position by binarizing a differential image from an image of a good workpiece stored in advance and collating the number of pixels exceeding a threshold with a reference value, as disclosed in, for example, Japanese Patent Application Laid-Open No. 2007-240434.

The determination result output unit23displays a determination result by the determination unit22on a display device (not illustrated). Alternatively, the determination result output unit23may display a determination result on the display part61included in the information processing device60.

The notification part24performs an error notification indicating that abnormality occurs in the imaging device10when the READY1 signal output from the imaging device10is turned on at a timing at which the instruction unit21outputs an imaging trigger. The notification part24displays, for example, an error screen on the display device (not illustrated). As described above, the designation route is set so that a time T1_iof movement from the i-th imaging position Ci to the i+1-th imaging position C(i+1) is greater than the time T2_inecessary for the process of changing the imaging condition Di to the imaging condition D(i+1). Therefore, when the imaging device10normally operates, the change to the imaging condition corresponding to the imaging position is completed at a timing at which the imaging device10arrives at the imaging position. The fact that the READY1 signal in the ON state indicating that the condition changing instruction is not receivable is output at a timing at which the imaging device10arrives at the imaging position means that some abnormality occurs in the imaging device10.

Further, even when the READY2 signal output from the imaging device10is in the ON state at a timing at which the instruction unit21outputs an imaging trigger, the notification part24may perform error notification indicating that abnormality occurs in the imaging device10. The fact that the READY2 signal in the ON state indicating that the imaging trigger is not receivable is output at a timing at which the imaging device10arrives at the imaging position means that some abnormality occurs in the imaging device10.

When the notification part24performs error notification, the PLC50may stop the moving and the imaging of the imaging device10.

(L. Flow of Inspection Method in Appearance Inspection System)

FIG. 13is a flowchart illustrating an example of a flow of an inspection method in the appearance inspection system. In the example illustrated inFIG. 13, in step S11, the PLC50first reads the information indicating the designation route set by the information processing device60.

Subsequently, in step S12, the PLC50outputs an instruction to move the imaging device10along the designation route to the robot controller40. Thus, the robot30starts moving the imaging device10along the designation route.

Further, in step S13, the PLC50outputs an instruction to change the imaging condition into the imaging condition corresponding to the imaging position to the image processing device20. Here, the PLC50outputs an instruction to change the imaging condition into the imaging condition corresponding to the first imaging condition to the image processing device20. The image processing device20outputs the condition changing instruction to which the information indicating the imaging condition is added to the imaging device10. Thus, the image sensor control part14and the lens control part16of the imaging device10start the process of changing the imaging condition.

Subsequently, in step S14, it is determined whether the imaging device10arrives at the imaging position. When the XYZ coordinate values and θx, θy, and θz of the imaging device10match the XYZ coordinate values and θx, θy, and θz of the imaging position, it is determined that the imaging device10arrives at the imaging position. When the imaging device10does not arrive at the imaging position (NO in step S14), the process returns to step S14. When the imaging device10arrives at the imaging position (YES in step S14), the image processing device20determines in step S15whether the process of changing the imaging condition is completed. Specifically, when the READY2 signal output from the imaging device10is in the OFF state, the image processing device20determines that the process of changing the imaging condition is completed.

When the process of changing the imaging condition is completed (YES in step S15), the image processing device20outputs an imaging trigger to the imaging device10in step S16. Thus, the imaging device10images the workpiece W.

Subsequently, in step S17, the PLC50determines whether there is a subsequent imaging position. When there is the subsequent imaging position (YES in step S17), the process returns to step S13and the process of changing the imaging condition to the imaging condition corresponding to the subsequent imaging position starts. Thereafter, steps S14to S16are repeated. By repeating steps S14to S16, the imaging device10sequentially images the plurality of inspection target positions.

When there is no subsequent imaging position (that is, the imaging of all the inspection target positions is completed) (NO in step S17), the image processing device20processes the image captured by the imaging device10and determines quality of the appearance of the workpiece W in step S18. Subsequently, in step S19, the image processing device20outputs a determination result. Thus, the inspection process ends.

Conversely, when the changing of the imaging condition is not completed (NO in step S15), the notification part24performs error notification indicating that abnormality occurs in the imaging device10in step S20. Further, the PLC50stops the operation of each part and ends the inspection process.

FIG. 14is a timing chart illustrating a flow of a process in the imaging device. When the condition changing instruction is received from the image processing device20(step S30), the image sensor control part14and the lens control part16start changing the imaging condition in accordance with the information added to the condition changing instruction. For example, the image sensor control part14changes the shutter speed from E1to E2(step S31). The lens control part16changes the focus position from F1to F2(step S32) and changes the zoom magnification from Z1to Z2(step S33).

Further, when the condition changing instruction is received, the lens control part16switches the READY1 signal and the READY2 signal to the ON state. When the change in all the imaging conditions is completed, the READY1 signal and the READY2 signal are switched to the OFF state.

When the READY1 signal and the READY2 signal are in the OFF state and the imaging trigger is received from the image processing device20(step S34), the image sensor control part14opens the shutter and performs the exposure process (step S35). Thereafter, the image generation process is performed based on an amount of charges accumulated in each pixel of the image sensor13(step S36).

When the imaging trigger is received, the image sensor control part14switches the READY2 signal to the ON state. When the image generation process is completed, the image sensor control part14switches the READY2 signal to the OFF state.

(M. Modification Examples of Appearance Inspection System)

FIG. 15is a diagram illustrating an appearance inspection system according to a modification example. The appearance inspection system illustrated inFIG. 15is different from the appearance inspection system1illustrated inFIG. 1in that the PLC50is not included and an image processing device20ais included instead of the image processing device20. The image processing device20ahas both the configuration of the image processing device20and the configuration of the PLC50.

FIG. 16is a diagram illustrating another form in which a relative position between the workpiece W and the imaging device is changed. As illustrated inFIG. 16, the robot30may move the workpiece W rather than the imaging device10. In the example illustrated inFIG. 16, the imaging device10is fixed. The relative position between the workpiece W and the imaging device10may be changed by moving the workpiece W in this way.

FIG. 17is a diagram illustrating still another form in which the relative position between the workpiece W and the imaging device is changed. As illustrated inFIG. 17, the workpiece W may be placed on a rotational table91. The rotational table91rotates in response to an instruction from the robot controller40. Thus, it is possible to easily change the relative position between the workpiece W and the imaging device10.

The robot30may be a robot (for example, a horizontally articulated robot or an orthogonal robot) other than a vertically articulated robot.

As described above, the image sensor control part14and the lens control part16are included in the imaging device10. However, the image sensor control part14and the lens control part16may be included in the image processing device20. In this case, the image sensor control part14and the lens control part16included in the image processing device20control the image sensor13and the lens module12, respectively, via the communication I/F part18of the imaging device10.

Further, the image processing device20may include each part of the information processing device60illustrated inFIG. 6(the display part61, the storage part62, the inspection position decision part63, the imaging position decision unit64, the imaging condition decision unit65, the estimation part66, and the setting part67). For example, the image processing device20may include at least one of the estimation part66and the setting part67in the block of the information processing device60illustrated inFIG. 6. At this time, as described above, the image sensor control part14and the lens control part16may be included in the image processing device20. That is, the image processing device20may not include the image sensor control part14and the lens control part16and may include at least one of the estimation part66and the setting part67. Alternatively, the image processing device20may include at least one of the image sensor control part14and the lens control part16, and the estimation part66and the setting part67.

Further, the imaging device10may include the storage part62, the inspection position decision part63, the imaging position decision unit64, the imaging condition decision unit65, the estimation part66, and the setting part67of the information processing device60illustrated inFIG. 6. For example, the imaging device10may include at least one of the estimation part66and the setting part67in the block of the information processing device60illustrated inFIG. 6. At this time, as described above, the image sensor control part14and the lens control part16may be included in the image processing device20. That is, the imaging device10may not include the image sensor control part14and the lens control part16and may include at least one of the estimation part66and the setting part67. Alternatively, the imaging device10may include at least one of the image sensor control part14and the lens control part16, and the estimation part66and the setting part67.

As described above, after one imaging position is decided with regard to each inspection target position by the imaging position decision unit64, the designation route is set based on the evaluation value. However, the plurality of imaging positions may be decided with regard to each inspection target position by the imaging position decision unit64, one imaging position may be selected from the plurality of imaging positions so that the evaluation value is the minimum (or the maximum), and the designation route passing through the selected imaging position may be set.

As described above, after the order in which the imaging device passes through the plurality of imaging positions is decided by the imaging position decision unit64, the designation route is set based on the evaluation value. However, the setting part67may calculate evaluation values for route candidates when the order in which the imaging device passes through the plurality of imaging positions is different, and may decide the passing order based on the evaluation value.

(N. Operational Effects and Advantages)

As described above, in the appearance inspection system1according to the embodiment, when the relative position of the imaging device10with respect to the workpiece W is moved, the imaging device10images the workpiece W and performs the appearance inspection when the imaging device10arrives at each of the plurality of imaging positions. The appearance inspection system1includes the setting part67, the robot30, the image sensor control part14, and the lens control part16. The setting part67sets the designation route passing through the plurality of imaging positions passes in order. The robot30moves the relative position of the imaging device10with respect to the workpiece W along the designation route. The image sensor control part14and the lens control part16control the imaging condition of the imaging device10. The setting part67sets the designation route so that the time T1_iis longer than the time T2_i. The time T1_iis a time necessary for the robot30to move the imaging device10from the imaging position Ci to the imaging position C(i+1). The time T2_iis a time necessary for the process of changing the imaging condition Di corresponding to the imaging position Ci to the imaging condition D(i+1) corresponding to the imaging position C(i+1). The image sensor control part14and the lens control part16start the process of changing the imaging condition Di to the imaging condition D(i+1) earlier by the time T2_ior more than a scheduled time at which the imaging device10arrives at the imaging position C(i+1).

Thus, when the imaging device10arrives at the imaging position C(i+1), the imaging condition of the imaging device10is changed to the imaging condition D(i+1) corresponding to the imaging position C(i+1) simultaneously or before the arrival. Therefore, when the imaging device10arrives at the imaging position C(i+1), the imaging by the imaging device10can be performed instantly. As a result, it is possible to shorten the inspection time when the workpiece W is imaged from the plurality of imaging positions.

The appearance inspection system1further includes the estimation part66that estimates the time T2_ibased on the pre-decided information indicating the correlation between the imaging condition before the change and the imaging condition after the change, and the time necessary for the process of changing the imaging condition before the change to the imaging condition after the change. Thus, it is possible to easily estimate the time T2_ibased on the information indicating the correlation.

The appearance inspection system1further includes the notification part24that performs error notification when the image sensor control part14and the lens control part16do not complete the process of changing the imaging condition Di to the imaging condition D(i+1) by the scheduled time. Thus, the user can recognize abnormality in the imaging device10and perform an appropriate countermeasure such as maintenance.

The image sensor control part14and the lens control part16output the READY1 signal indicating whether the condition changing instruction is receivable. The image sensor control part14and the lens control part16output the READY1 signal indicating that the condition changing instruction is not receivable while performing the process of changing the imaging condition D1to the imaging condition D2. Thus, by checking the READY1 signal, it is possible to easily recognize the state of the imaging device10.

Further, the image sensor control part14and the lens control part16output the READY2 signal indicating whether the imaging trigger is receivable. The image sensor control part14and the lens control part16output the READY2 signal indicating that the imaging trigger is not receivable while performing the process of changing the imaging condition D1to the imaging condition D2. Thus, by checking the READY2 signal, it is possible to easily recognize the state of the imaging device10.

The image processing device20amay include the estimation part66. Alternatively, the image processing device20amay include the setting part67. Thus, the image processing device20acan determine the quality of the appearance of the workpiece W and perform at least some of the processes of setting the designation route.

Alternatively, the image processing device20amay include the setting part67, the image sensor control part14, and the lens control part16. Alternatively, the image processing device20may include the image sensor control part14and the lens control part16. Thus, the image processing devices20and20acan determine the quality of the appearance of the workpiece W and perform the process of changing the imaging condition in the imaging device10.

The imaging device10may include the estimation part66. Alternatively, the imaging device10may include the setting part67. Thus, the imaging device10can image the workpiece W and perform at least some of the processes of setting the designation route.

The imaging device10includes the image sensor control part14and the lens control part16. Alternatively, the imaging device10may include the setting part67, the image sensor control part14, and the lens control part16. Thus, the imaging device10can image the workpiece W and perform the process of changing the imaging condition.

As described above, the embodiments and the modification examples include the following disclosure.

An appearance inspection system (1) that performs appearance inspection by causing an imaging device (10) to image a target (W) when the imaging device (10) arrives at each of a plurality of imaging positions set for the target (W) while moving a relative position of the imaging device (10) with respect to the target (W), the appearance inspection system (10) including:a setting part (67) that sets a route passing through the plurality of imaging positions in order;a movement mechanism (30) that moves the relative position of the imaging device (10) with respect to the target (W) along the route; anda control part (14and16) that controls an imaging condition of the imaging device (10),wherein the setting part (67) sets the route so that a first time necessary for the movement mechanism (30) to move the imaging device (10) from a first imaging position to a second imaging position among the plurality of imaging positions is longer than a second time necessary for a process of changing a first imaging condition corresponding to the first imaging position to a second imaging condition corresponding to the second imaging position by the control part (14and16), andwherein the control part (14and16) starts the process of changing the first imaging condition to the second imaging condition earlier by the second time or more than a scheduled time at which the imaging device (10) arrives at the second imaging position when the movement mechanism (30) moves the imaging device (10) from the first imaging position to the second imaging position.
(Configuration 2)

The appearance inspection system (1) according to Configuration 1, further including:an estimation part (66) that estimates the second time based on pre-decided information indicating a correlation between an imaging condition before a change and an imaging condition after the change, and a time necessary for a process of changing the imaging condition before the change to the imaging condition after the change.
(Configuration 3)

The appearance inspection system (1) according to Configuration 1 or 2, further including:a notification part (24) that performs error notification when the control part (14and16) is not able to complete the process of changing the first imaging condition to the second imaging condition by the scheduled time.
(Configuration 4)

The appearance inspection system (1) according to any one of Configurations 1 to 3, wherein the control part (14and16) outputs a first state signal indicating that an instruction to change an imaging condition of the imaging device (10) is not receivable while the process of changing the first imaging condition to the second imaging condition is performed.

The appearance inspection system (1) according to any one of Configurations 1 to 4, wherein the control part (14and16) outputs a second state signal indicating that an imaging instruction to the imaging device (10) is not receivable while the process of changing the first imaging condition to the second imaging condition is performed.

An image processing device (20a) that is used in the appearance inspection system (1) according to Configuration 2 and determines quality of an appearance of the target (W) by processing an image captured by the imaging device (10), the image processing device (20a) including:the estimation part (66).
(Configuration 7)

An image processing device (20or20a) that is used in the appearance inspection system (1) according to any one of Configurations 1 to 5 and determines quality of an appearance of the target (W) by processing an image captured by the imaging device (10), the image processing device (20or20a) including:at least one of the setting part (67) and the control part (14and16).
(Configuration 8)

An imaging device (10) that is used in the appearance inspection system (1) according to Configuration 2, the imaging device (10) including:the estimation part (66).
(Configuration 9)

An imaging device (10) that is used in the appearance inspection system (1) according to any one of Configurations 1 to 5, the imaging device (10) including:at least one of the setting part (67) and the control part (14and16).
(Configuration 10)

An inspection method of performing appearance inspection by causing an imaging device (10) to image a target (W) when the imaging device (10) arrives at each of a plurality of imaging positions set for the target (W) while moving the imaging device (10), the inspection method including:setting a route passing through the plurality of imaging positions in order;moving a relative position of the imaging device (10) with respect to the target (W) along the route and controlling an imaging condition of the imaging device (10),wherein in the setting of the route, the route is set so that a first time necessary for moving the imaging device (10) from a first imaging position to a second imaging position among the plurality of imaging positions is longer than a second time necessary for a process of changing a first imaging condition corresponding to the first imaging position to a second imaging condition corresponding to the second imaging position, andwherein in the controlling of the imaging condition, the process of changing the first imaging condition to the second imaging condition starts earlier by the second time or more than a scheduled time at which the imaging device (10) arrives at the second imaging position.