Industrial cameras

The industrial camera addresses the bottleneck in data transfer by integrating downscaling within the image sensor, enabling high-speed image inspection of fast-moving objects with reduced pixel count images.

JP7875728B2Active Publication Date: 2026-06-18KEYENCE CORP

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
KEYENCE CORP
Filing Date
2022-05-26
Publication Date
2026-06-18

AI Technical Summary

Technical Problem

Existing image inspection systems face challenges in achieving high pixel resolution for fast-moving objects due to limitations in data transfer speed between image sensors and external processors, leading to bottlenecks in processing time.

Method used

An industrial camera with an integrated image sensor and logic unit performs downscaling within the sensor to generate images with a smaller pixel count, allowing faster transfer and processing of inspection target images.

🎯Benefits of technology

Enables high-speed image inspection of fast-moving objects by reducing data transfer time and maintaining inspection accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007875728000001
    Figure 0007875728000001
  • Figure 0007875728000002
    Figure 0007875728000002
  • Figure 0007875728000003
    Figure 0007875728000003
Patent Text Reader

Abstract

To realize a processing speed that can be supported even by a movable body whose inspection object is fast by enabling down-scaling to be performed in an image sensor.SOLUTION: An industrial camera 1 comprises: an image sensor 31 having a photoelectric conversion part 31a which can generate a photographed image larger in pixel number than an inspection object image, and a logic part 31b which is mounted on the same chip as the photoelectric conversion part 31a, generates an inspection object image smaller in pixel number than the photographed image by executing down-scaling to the photographed image corresponding to an output region, and outputs the inspection object image; a processor 41 which controls the image sensor 31; an output unit 42 which outputs to the outside the inspection object image output from the image sensor 31; and a housing storing the image sensor 31, the processor 41, and the output unit 42.SELECTED DRAWING: Figure 7
Need to check novelty before this filing date? Find Prior Art

Description

【Technical Field】 【0001】 The present disclosure relates to an industrial camera that generates an inspection target image obtained by imaging an inspection target such as a workpiece or the like. 【Background Art】 【0002】 Conventionally, as disclosed in Patent Document 1 for example, an image inspection system configured to determine the quality of an inspection target based on an inspection target image obtained by imaging the inspection target is known. The image inspection system disclosed in Patent Document 1 enables a multi-stage process to be performed in order on an imaging device conforming to a standardization specification, achieving both an improvement in the degree of freedom in selecting the model of the imaging device and an improvement in the accuracy of image inspection. 【Prior Art Documents】 【Patent Documents】 【0003】 【Patent Document 1】 Japanese Patent Application Laid-Open No. 2020-169958 【Summary of the Invention】 【Problems to be Solved by the Invention】 【0004】 By the way, in image inspection, it is important to be able to achieve a high pixel resolution in a desired field of view. If the field of view is constant, the pixel resolution improves as the number of pixels increases. Using a camera (image sensor) that far exceeds the number of pixels required for the desired pixel resolution results in processing an imaging image with an excessive amount of data, thus taking a long processing time. 【0005】 Therefore, it is conceivable to reduce the amount of data handled by subsequent image processing devices by downscaling the large-resolution image captured by the image sensor using an external FPGA or processor. However, since the image sensor and FPGA are separate devices, a process is required to transfer the large-resolution image from the image sensor to the FPGA. Because there are limits to the transfer speed from the image sensor to the FPGA, the communication time between devices becomes a bottleneck when transferring large amounts of images, making high-speed imaging impossible. This makes it unsuitable for applications where shortening the imaging time is important, such as image inspection of fast-moving objects. 【0006】 This disclosure is made in view of the above, and its purpose is to enable downscaling within the image sensor to achieve a processing speed that can handle even fast-moving objects being inspected. [Means for solving the problem] 【0007】 To achieve the above objective, one aspect of this disclosure may be based on an industrial camera that generates an inspection target image obtained by imaging an object to be inspected. The industrial camera may be configured to include an image sensor having: a photoelectric conversion unit capable of generating an image with a larger number of pixels than the inspection target image; a logic unit mounted on the same chip as the photoelectric conversion unit, which generates an inspection target image with a smaller number of pixels than the image by performing downscaling on the image corresponding to an output area which is all or part of the pixel group of the photoelectric conversion unit, and outputs the inspection target image; a processor that controls the image sensor; an output unit that outputs the inspection target image output from the image sensor to the outside; and a housing that houses the image sensor, the processor, and the output unit. 【0008】 In this configuration, when the photoelectric conversion unit generates an image with a larger pixel count than the image to be inspected, the logic unit of the image sensor performs downscaling to generate an image to be inspected with a smaller pixel count than the captured image. The downscaled image to be inspected with a smaller pixel count is transferred to the outside of the image sensor and made available for image inspection. In other words, since downscaling is performed within the image sensor, the transfer speed to the outside can be increased, making it possible to perform image inspection on objects that are moving at high speed, for example. Furthermore, the industrial camera according to this embodiment can also be used to inspect objects other than moving objects. 【0009】 Furthermore, the logic unit may be configured to transfer the images to be inspected to the processor. In this case, the captured images can be downscaled so that the transfer speed of the images to be inspected generated by the logic unit to the processor is relatively faster than the transfer speed of the captured images generated by the photoelectric conversion unit to the processor. This allows for the sequential inspection of a large number of objects moving continuously at high speed. 【0010】 The industrial camera may also include a condensing lens that collects light incident from a light-receiving window in the housing, and a lens drive mechanism that drives the condensing lens in the optical axis direction to adjust the focal position and optical magnification. In this case, the image sensor can be a CMOS (Complementary Metal Oxide Semiconductor) type image sensor having a number of pixels greater than the number of pixels required to receive the light collected by the condensing lens and generate an image of the object to be inspected. 【0011】 Furthermore, the industrial camera may also include an interface unit that receives a zoom command to change the output area to a relatively smaller area, and the processor may be able to calculate the scaling factor to be executed by the logic unit of the image sensor based on the zoom command. In this case, the logic unit can downscale the captured image using the scaling factor calculated by the processor. 【0012】 Furthermore, the interface unit may accept the selection of the number of pixels in the image to be inspected, and the smaller the selected number of pixels, the higher the transfer speed from the logic unit to the processor, in accordance with the number of pixels in the image to be inspected output from the image sensor. [Effects of the Invention] 【0013】 As explained above, since the image sensor has a logic unit that performs downscaling, the small pixel count image of the object to be inspected, generated by performing downscaling within the image sensor, can be transferred to an external source. This enables a processing speed that can handle even fast-moving objects being inspected. [Brief explanation of the drawing] 【0014】 [Figure 1] This is an overall diagram showing the usage status of an image inspection system equipped with an industrial camera according to an embodiment. [Figure 2] This is a perspective view of an industrial camera from above. [Figure 3] This is a front view of an industrial camera. [Figure 4] This is a side view of an industrial camera. [Figure 5] This is a perspective view of an industrial camera seen from below. [Figure 6] This is a cross-sectional view showing the internal structure of an industrial camera. [Figure 7] This is a block diagram of the image inspection system. [Figure 8] This is a diagram illustrating the concept of downscaling. [Figure 9] This diagram illustrates the process of downscaling based on images of a specific workpiece. [Figure 10] This diagram illustrates how downscaling can be performed based on a zoom instruction at an arbitrary position. [Figure 11] This figure shows an example of a user interface screen that accepts zoom commands and other instructions. [Figure 12] This is a diagram for explaining the case of performing downscaling based on a zoom instruction by area selection using a mouse. [Figure 13] This is a diagram for explaining the case of performing downscaling after panning and tilting to an arbitrary position. [Figure 14] This is a diagram for explaining the case of performing downscaling while changing the aspect ratio of an image. [Figure 15] This is a diagram for explaining the case of performing panning and tilting after downscaling centered on a fixed point. [Figure 16] This is a diagram for explaining the case of a zoom ratio that can be handled only by downscaling. [Figure 17] This is a diagram for explaining the case of handling with downscaling and optical zoom. [Figure 18] This is a diagram for explaining an example of the case of combining optical zoom and downscaling. [Figure 19] This is a diagram for explaining an example of the case of changing only the aspect ratio during downscaling. [Figure 20] This is a diagram for explaining an example of the case of increasing or decreasing the number of pixels during downscaling. [Figure 21] This is a diagram for explaining an example of the case of generating an inspection target image after rotation. [Figure 22] This is a diagram showing an example of the case of realizing downscaling by a processor. [Figure 23] This is a conceptual diagram of the case of downscaling a color imaging image. [Figure 24] This is a diagram showing the procedure for the case of downscaling a color imaging image. [Figure 25] This is a diagram showing an example of interpolation processing and downscaling of each pixel constituting a color imaging image. [Figure 26] This is a diagram for explaining the case when a low-pass filter is applied. [Figure 27] This is a flowchart showing an example of the processing procedure when a zoom ratio is input. [Figure 28]This flowchart shows an example of the processing procedure when specifying the field of view resolution. [Figure 29] This is a flowchart showing an example of the pan-tilt processing procedure. [Figure 30] This flowchart shows an example of the procedure for changing the aspect ratio. [Modes for carrying out the invention] 【0015】 Embodiments of the present invention will be described in detail below with reference to the drawings. The following description of preferred embodiments is essentially illustrative and is not intended to limit the present invention, its applications, or its uses. 【0016】 Figure 1 is an overall view showing the usage state of an image inspection system 2 equipped with an industrial camera 1 according to an embodiment of the present invention. The image inspection system 2 shown in Figure 1 comprises two industrial cameras 1 and a control personal computer (hereinafter referred to as a controller) 3. The number of industrial cameras 1 is not limited to two; there may be one or three or more. The industrial camera 1 has a shape as shown in Figures 2 to 5, etc., which will be described in detail later, and has an internal structure as shown in Figure 6. This industrial camera 1 generates an inspection target image obtained by imaging a workpiece W, which is the object to be inspected. The image inspection system 2 including the industrial camera 1 that generates such an inspection target image can also be called an image processing device. 【0017】 Although not shown in the diagram, the industrial camera 1 is capable of receiving trigger signals output from, for example, a programmable logic controller or a sensor that detects the arrival of the workpiece W. Upon receiving a trigger signal, the industrial camera 1 performs imaging processing to generate an image of the object to be inspected. Alternatively, the industrial camera 1 may repeatedly perform imaging processing internally to generate an image of the object to be inspected without receiving a trigger signal from an external source. Although not shown in the diagram, the image inspection system 2 may also include an illumination unit for illuminating the workpiece W, and the illumination unit is controlled to illuminate the workpiece W in synchronization with the imaging processing of the industrial camera 1. 【0018】 In this example, as shown in Figure 1, we will describe a site where the industrial camera 1 is used, where multiple workpieces W are sequentially transported by a conveying device such as a belt conveyor B. However, it may also be a site where stationary workpieces W are inspected. The industrial camera 1 is attached to the camera mounting member 4 and is installed in a predetermined position and orientation. 【0019】 The controller 3 is used to configure various settings for the industrial camera 1, and can be configured as, for example, a desktop personal computer, a notebook personal computer, or a dedicated processing unit for image inspection; its form is not particularly limited. The controller 3 comprises a main unit 5, a storage unit 6, a keyboard 7, a mouse 8, and a monitor 9. The main unit 5 is connected to the industrial camera 1 via a cable 10 for communication. The main unit 5 is equipped with a control unit 5a, which consists of a central processing unit, ROM, RAM, etc. The storage unit 6 is composed of a hard disk drive or a solid-state drive, and stores programs for operating the control unit 5a, setting information for the industrial camera 1, various images, etc. Part of the storage unit 6 may be located in the industrial camera 1, in which case the setting information and various images of the industrial camera 1 can be stored in the industrial camera 1. 【0020】 The keyboard 7 and mouse 8 are operating units for operating the controller 3, and the operating status of the keyboard 7 and mouse 8 is detected by the control unit 5a. The operating units are not limited to the keyboard 7 and mouse 8, but may also be so-called touch panel type operating units. The monitor 9 is composed of, for example, a liquid crystal display device, and is controlled by the control unit 5a to display various user interfaces for setting the industrial camera 1, various images, etc. 【0021】 (Industrial camera configuration) As shown in Figure 6, the industrial camera 1 comprises a lens unit 20, a sensor board 30, a main board 40, a housing 50, and a storage unit 39. The storage unit 39 stores setting information, various images, and other data for the industrial camera 1. 【0022】 The housing 50 is made of a highly rigid material such as an aluminum alloy. For the sake of explanation, the vertical, horizontal, and front-to-back directions are defined as shown in Figures 2 to 5, but this does not limit the orientation during use, and the industrial camera 1 can be used in any orientation. 【0023】 The housing 50 has an upper portion 51 and a lower portion 52. The upper portion 51 is longer in the front-to-back direction than the lower portion 52. The lower portion 52 is formed to protrude downward from the rear of the upper portion 51. As shown in Figures 2 and 3, a light-receiving window 51a is formed on the front of the upper portion 51. Also, as shown in Figure 6, the lens unit 20 and the sensor substrate 30 are housed in the upper portion 51, and the main substrate 40 is housed in the lower portion 52. In other words, the housing 50 incorporates the image sensor 31, processor 41, and output unit 42, which will be described later. 【0024】 The lens unit 20 is a zoom lens equipped with a zoom optical system that allows for motorized optical zooming, and the optical zoom magnification can be switched to any magnification within a predetermined range. The lens unit 20 is fixed to the housing 50 and is integrated with the housing 50. 【0025】 In other words, the optical axis of the lens unit 20 coincides with the front-to-back direction of the housing 50. The lens unit 20 has a first lens group 21, a second lens group 22, a third lens group 23, a fourth lens group 24, a fifth lens group 25, and a lens barrel 26 that holds the first to fifth lens groups 21 to 25. The first to fifth lens groups 21 to 25 constitute a condensing lens that collects light incident from the light-receiving window 51a. Furthermore, the number of lenses constituting each of the first to fifth lens groups 21 to 25 is not particularly limited and may be any number, and the number of lens groups may be four or fewer, or six or more. In addition, the lens unit 20 may be a zoom optical system that allows manual optical zooming. 【0026】 The first lens group 21 is a fixed lens group located on the front of the housing 50 and receives reflected light from the workpiece W. The first lens group 21 faces the outside of the housing 50 through the light-receiving window 51a. The second lens group 22 is a movable zoom lens group located behind the first lens group 21 and receives light emitted from the first lens group 21. The third lens group 23 is a fixed lens group located behind the second lens group 22 and receives light emitted from the second lens group 22. The fourth lens group 24 is a movable focus lens group located behind the third lens group 23 and receives light emitted from the third lens group 23. The fifth lens group 25 is a fixed lens group located behind the fourth lens group 24 and receives light emitted from the fourth lens group 24. 【0027】 The lens barrel 26 is equipped with a zoom ball screw 56a, a zoom guide shaft 56b, and a zoom motor 56c that rotates the zoom ball screw 56a in forward and reverse directions. The second lens group 22 is supported by the zoom ball screw 56a and the zoom guide shaft 56b. When the zoom ball screw 56a is rotated by the zoom motor 56c, the second lens group 22 moves in the optical axis direction, thereby obtaining the desired zoom magnification. The zoom ball screw 56a, zoom guide shaft 56b, and zoom motor 56c constitute a zoom lens drive mechanism that drives the second lens group 22 in the optical axis direction and adjusts the optical magnification. 【0028】 Furthermore, the lens barrel 26 is equipped with a focusing ball screw 56d, a focusing guide shaft 56e, and a focusing motor 56f that rotates the focusing ball screw 56d in forward and reverse directions. The fourth lens group 24 is supported by the focusing ball screw 56d and the focusing guide shaft 56e, and when the focusing ball screw 56d is rotated by the focusing motor 56f, the fourth lens group 24 moves in the optical axis direction, thereby adjusting the focus. The focusing ball screw 56d, the focusing guide shaft 56e, and the focusing motor 56f constitute a zoom lens drive mechanism that drives the fourth lens group 24 in the optical axis direction to adjust the focal position. 【0029】 As shown in Figure 7, the main board 40 is provided with a zoom control unit 40a, an AF control unit 40b, and an interface unit 40c. The interface unit 40c is a part that receives external inputs such as zoom commands. When the interface unit 40c receives a zoom command for optical zoom, the zoom control unit 40a controls the zoom motor 56c to move the second lens group 22 in the optical axis direction to achieve the zoom magnification received by the interface unit 40c. 【0030】 The AF control unit 40b is the part that performs conventionally known contrast-type or phase-detection-type autofocus control. The AF control unit 40b controls the focus motor 56f to move the fourth lens group 24 in the optical axis direction so that the focal position matches that of the workpiece W. 【0031】 As shown in Figure 6, the sensor substrate 30 is positioned behind the fifth lens group 25. An image sensor 31, which acts as an imaging unit, is mounted on the sensor substrate 30. As shown in Figure 7, the image sensor 31 includes a photoelectric conversion unit 31a that receives light focused by a condensing lens, a logic unit 31b that generates an inspection target image from the image acquired by the photoelectric conversion unit 31a, and a color filter 31c (shown in Figure 6), enabling the generation of a color inspection target image obtained by imaging the object to be inspected. The photoelectric conversion unit 31a and the color filter 31c enable the generation of a color image where each color is formed in a predetermined arrangement pattern. The photoelectric conversion unit 31a can also generate a monochrome image. The following description applies to both monochrome and color images. 【0032】 The photoelectric conversion unit 31a is capable of generating an image with a larger number of pixels than the image to be inspected. The logic unit 31b is mounted on the same chip as the photoelectric conversion unit 31a and constitutes the image generation unit. Specifically, the photoelectric conversion unit 31a is a CMOS image sensor, composed of a stack of multiple wafers, and the logic unit 31b is formed from a portion of these wafers. The portion of the wafer may include memory or the like. 【0033】 Furthermore, the photoelectric conversion unit 31a is a CMOS image sensor using either a global shutter or a rolling shutter method. In the case of a global shutter method, distortion-free images can be captured even for moving objects. In the case of a rolling shutter method, high pixel count can be achieved with about half the pixel pitch of the global shutter method, which allows for miniaturization of the lens size of each lens in the lens unit 20, and consequently, miniaturization of the housing 50, improving the flexibility of installation. The pixel group of the photoelectric conversion unit 31a forms the field of view of the image sensor 31. The field of view of the image sensor 31 is also called the field of view of the photoelectric conversion unit 31a. 【0034】 The logic unit 31b generates an inspection target image with a smaller number of pixels than the captured image by performing downscaling on the captured image corresponding to the output area, which is all or part of the pixel group (field of view of the image sensor 31) of the photoelectric conversion unit 31a, and outputs the inspection target image. Here, downscaling refers to the process of reducing the pixel resolution of the target image. 【0035】 The concept of downscaling will be explained based on Figure 8. Figure 8 schematically shows the case where a workpiece W is imaged by an industrial camera 1. For example, suppose the number of pixels of the photoelectric conversion unit 31a is 20MP (megapixels) (in the drawing, this is simply indicated as 20M, etc.). As shown on the left side of Figure 8, by optical zooming, the field of view becomes narrower than the normal field of view, and the region of interest (ROI) becomes an even narrower area than the field of view after optical zooming. As shown on the right side of Figure 8, if the region of interest is extracted from the image A1 captured with 20MP pixels, the pixel resolution remains the same, and the region of interest becomes, for example, a region of interest A2 with 5MP pixels. Similarly, if the region of interest is extracted from the image A3 after optical zooming, the pixel resolution remains the same, and the region of interest becomes a region of interest A4 with 5MP pixels. 【0036】 When downscaling from captured image A1, the scaling factor (also called the downscaling ratio) can be set arbitrarily. The scaling factor can be calculated by dividing the number of captured pixels by the number of output pixels. For example, if you want to output an image with the same field of view as an image captured at 20MP at 10MP, the scaling factor will be 2x. 【0037】 Downscaling can be performed while keeping the aspect ratio of the image constant, or while changing the aspect ratio. When the aspect ratio is kept constant, as mentioned above, for example, if you output an image with the same field of view as an image captured at 20MP at 10MP, the scaling factor will be 2x. On the other hand, if you change the aspect ratio, for example, if you output an image captured at 5000x4000 pixels (20MP) with the same field of view at 2500x2000 pixels (5MP), the scaling factor will be 4x. Also, if you downscale a 3200x4000 area of ​​interest to 2000x2500, the scaling factor will be 2.56x. 【0038】 If the aspect ratio of the image remains constant and the scaling factor is set to, for example, 4x, then an image of the entire workpiece, A5, with 5MP pixels, is obtained. By using optical zoom and downscaling in combination with image A5, a focus area A4 with higher pixel resolution than image A5 can be obtained. Furthermore, by downscaling from the image A3 captured after optical zoom, a workpiece image A6 with lower pixel resolution than image A3 can be obtained. 【0039】 Figure 9 is a diagram illustrating downscaling based on an image of a specific workpiece W. The first image B1 is the image corresponding to the output region, which is the entire area of ​​the field of view of the imaging unit, i.e., the entire area of ​​the field of view of the imaging unit. The logic unit 31b downscales the first image B1 by an arbitrary first scaling factor to generate an inspection target image B2 with a first number of pixels (e.g., 1.6MP) smaller than the number of pixels of the first image B1 (e.g., 20MP). 【0040】 The interface unit 40c can receive a specification for an output area, which is the area to be output as an image to be inspected within the field of view of the photoelectric conversion unit 31a, i.e., the imaging unit. This output area may be, for example, the area of ​​interest explained using Figure 8. The interface unit 40c can also receive an instruction to change at least one of the position, size, and shape of the output area. 【0041】 For example, the interface unit 40c is configured to receive a first zoom instruction from the user to change the output area of ​​the photoelectric conversion unit 31a to a relatively smaller area. Specifically, the first zoom instruction changes the output area to a part of the pixel group of the photoelectric conversion unit 31a, that is, a part of the field of view of the imaging unit. The second image B1' is an image corresponding to the output area after it has been changed by the first zoom instruction. The second image B1' is captured at a different timing than the first image B1 and is independent of the first image B1. The logic unit 31b downscales the second image B1' by a second scaling factor to generate an inspection target image B3 with a first pixel count (e.g., 1.6MP) that is smaller than the pixel count of the second image B1' (e.g., 5MP). Alternatively, the second image B1' may be generated based on the first image B1, for example, by cropping a part of the first image B1. Furthermore, the interface unit 40c is configured to accept instructions to adjust the first zoom magnification not only as an integer but also with decimal precision. 【0042】 As shown in Figure 7, the main board 40 is equipped with a processor 41 that performs various calculations and controls the image sensor 31. The processor 41 has an arithmetic unit 41a, and based on the results calculated by the arithmetic unit 41a, the processor 41 controls the logic unit 31b of the image sensor 31 and causes the logic unit 31b to generate the desired inspection target image. 【0043】 The calculation unit 41a calculates a second scaling factor necessary to make the second captured image B1', which corresponds to the modified output area within the field of view of the photoelectric conversion unit 31a, have the first number of pixels. The calculation unit 41a outputs the calculated second scaling factor to the logic unit 31b. The logic unit 31b generates the inspection target image B3 with the first number of pixels by downscaling the second captured image B1' with the second scaling factor calculated by the calculation unit 41a. The inspection target image B3 with the first number of pixels has a lower resolution than the first captured image B1, which corresponds to the output area of ​​the photoelectric conversion unit 31a, but it has enough resolution to ensure the necessary inspection accuracy, and no problems arise in terms of inspection accuracy. 【0044】 The calculation unit 41a calculates that the higher the first zoom magnification received by the interface unit 40c, the smaller the second scaling magnification. The logic unit 31b reduces the amount of downscaling for the second captured image B1' as the second scaling magnification calculated by the calculation unit 41a becomes smaller. As a result, the logic unit 31b generates an inspection target image with high pixel resolution. 【0045】 Based on the first zoom magnification received by the interface unit 40c, the calculation unit 41a calculates the ratio of how many pixels in the second captured image B1' correspond to one pixel of the first pixel-count inspection image B3. Using this ratio, the calculation unit 41a calculates the second scaling magnification. 【0046】 When the interface unit 40c receives an adjustment instruction for the first zoom magnification with decimal precision, the calculation unit 41a calculates, to the decimal extent, the ratio of how many pixels in the second image B1' correspond to one pixel of the image B3 under inspection, based on the zoom magnification adjustment instruction received with decimal precision. This allows the calculation unit 41a to calculate the second scaling magnification with decimal precision. The logic unit 31b generates the image under inspection based on the second scaling magnification calculated with decimal precision. 【0047】 Figure 10 illustrates the case where downscaling is performed based on a zoom instruction at an arbitrary position. The interface unit 40c is configured to accept a first zoom instruction, which changes the output area of ​​the photoelectric conversion unit 31a to a relatively smaller area, as a zoom instruction at an arbitrary position in the image to be inspected. Specifically, for the sake of explanation, the frame C1 in the captured image B1 in Figure 10 indicates the position and area where the zoom instruction was received within the field of view of the imaging unit. The user may specify frame C1 relative to the image to be inspected B2 via a mouse 8 or the like while checking the monitor 9 which displays the downscaled image to be inspected B2 of the entire captured image B1 in Figure 9. The position of frame C1 can be placed anywhere in the image to be inspected B2 (i.e., within the field of view of the imaging unit), and the interface unit 40c detects the placed position. The size and shape of frame C1 can also be arbitrarily set by the user. 【0048】 When the interface unit 40c receives a zoom command specifying frame C1 as an arbitrary position, the logic unit 31b downscales the area corresponding to the output area including the arbitrary position within the field of view of the imaging unit (i.e., the captured image corresponding to frame C1, which has a pixel count greater than 1.6MP) by the scaling factor required to make it 1.6MP. As a result, the logic unit 31b generates an inspection target image B4 that includes the arbitrary position. The position of frame C1 may be shifted in the X direction (horizontal direction of the image) or Y direction (vertical direction of the image) from the center of the field of view of the imaging unit, and the area located at a position offset from the center of the field of view of the imaging unit, i.e., the optical axis, can be downscaled. In other words, while general optical zoom zooms along the optical axis center, in this example, not only the optical axis center but also areas offset from the optical axis center can be zoomed, and there is a high degree of freedom in setting the position of the downscaleable area. 【0049】 Figure 11 shows a user interface screen 100 for settings that can accept zoom commands. This user interface screen 100 is generated by the control unit 5a of the controller 3 and displayed on the monitor 9. On the user interface screen 100, operation is possible using the keyboard 7 and mouse 8, and the control unit 5a detects and stores what operations have been performed. 【0050】 The user interface screen 100 is provided with an image display area 101. The image display area 101 displays an overhead image D1 showing the position of the output area within the entire field of view of the photoelectric conversion unit 31a, and an inspection target image D2 corresponding to the output area. In other words, the interface unit 40c of the industrial camera 1 shown in Figure 7 is configured to output the overhead image D1 showing the position of the output area within the entire field of view of the photoelectric conversion unit 31a, and the inspection target image D2 corresponding to the output area to the outside. Specifically, the main board 40 is provided with an output unit 42. The output unit 42 is the part that outputs the overhead image D1 and the inspection target image D2 output from the image sensor 31 to the outside. When outputting, image data is transmitted from the industrial camera 1 to the controller 3, for example, via the input / output terminal 60 and cable 10. 【0051】 The user interface screen 100 shown in Figure 11 is provided with a zoom adjustment area 101A for the user to adjust the zoom magnification. By operating the zoom adjustment area 101A to the "T" side with the mouse 8, the field of view is narrowed by zooming to the telephoto side, while operating it to the "W" side expands the field of view. The zoom magnification can also be adjusted by operating the mouse wheel 8. The adjusted zoom magnification is temporarily stored on the controller 3 side and transferred to the interface unit 40c of the industrial camera 1, where it is accepted. 【0052】 The zoom level can also be adjusted numerically. Specifically, the user interface screen 100 is provided with a numerical input area 102. The numerical input area 102 is for the user to adjust the zoom level by entering a numerical value, which can be entered arbitrarily using the keyboard 7, mouse 8, etc. 【0053】 Figure 12 illustrates the case where downscaling is performed based on zoom instructions using area selection with the mouse 8. Frame C10 is formed by the operation of the mouse 8, for example, by dragging from the upper left to the lower right (or from the upper right to the lower left, etc.). The logic unit 31b generates a 5MP inspection target image by downscaling the captured image corresponding to the area enclosed by frame C10. Similarly, frame C11 can also be formed by the operation of the mouse 8, and the area within frame C11 is enlarged. At this time, if the area within frame C11 in the captured image B1 is less than 5MP, and the size of the inspection target image to be output is 5MP, it exceeds the maximum resolution (resolution of captured image B1). Therefore, the 5MP area including frame C11 is downscaled at a scaling factor of 1x (i.e., not actually downscaled) and output as the inspection target image. 【0054】 Figure 13 illustrates the case where downscaling is performed after pan-tilting an arbitrary position. The interface unit 40c is configured to accept a first pan-tilt instruction to adjust an arbitrary position in the X and Y directions. For example, after designating the center of the field of view of the photoelectric conversion unit 31a as the area of ​​interest with frame C1, the position of frame C1 is moved in the X and Y directions to the position indicated by, for example, symbol C1'. When downscaling is performed with frame C1, the inspection target image B5 is obtained. The logic unit 31b generates the inspection target image B5' with adjusted positions in the X and Y directions by downscaling the captured image corresponding to the arbitrary position (position of frame C1') after adjustment in the X and Y directions. The logic unit 31b generates the inspection target image B6 by further downscaling a part of the area enclosed by frame C1'. 【0055】 Adjustments in the X and Y directions can be made using the user interface screen 100 shown in Figure 11. The user interface screen 100 is provided with a field of view position adjustment area 103. The field of view position adjustment area 103 is composed of a combination of arrows pointing in the up, down, left, and right directions. For example, operating the upward-pointing arrow moves the position of frame C1 upwards. Similarly, the position of frame C1 can be adjusted to any position down, left, or right. Frame C1 can also be directly dragged with the mouse 8. 【0056】 Figure 14 illustrates the case of downscaling while the aspect ratio of an image has been changed. The interface unit 40c is configured to accept changes in the aspect ratio of the output area of ​​the photoelectric conversion unit 31a. For example, as shown by frame C1, when a zoom instruction is received for any position within the field of view of the imaging unit, the logic unit 31b generates the inspection target image B7 by downscaling the captured image corresponding to frame C1. Subsequently, the user can freely specify the aspect ratio of the area specified by frame C1. The area after the aspect ratio has been changed is shown by frame C2. The logic unit 31b generates the inspection target image B7' by downscaling the area corresponding to the output area with the changed aspect ratio (the area enclosed by frame C2). From there, the inspection target image B7'' is generated by further downscaling a part of the area enclosed by frame C2. 【0057】 Figure 15 illustrates the case where downscaling is performed around a fixed point, followed by pan-tilt. For example, if the center of the field of view of the photoelectric conversion unit 31a is set as the fixed point, the logic unit 31b generates the inspection target image B5 by downscaling the frame C1 which includes the center of the field of view of the imaging unit. Then, as shown in Figure 13, pan-tilt is performed, and the logic unit 31b generates the inspection target image B8 by downscaling the captured image corresponding to the pan-tilt region. 【0058】 Furthermore, the interface unit 40c is configured to accept a pixel count change instruction to change the number of pixels in the image to be inspected from the first number of pixels to the second number of pixels. The second number of pixels is a larger number of pixels than the first number of pixels. Specifically, the user interface screen 100 shown in Figure 11 is provided with a pixel count setting area 104. In the pixel count setting area 104, the number of pixels in the image to be inspected can be selected from a predetermined set of options in the form of a pull-down menu. The selectable number of pixels can be, for example, in the range of 1.6MP to 5MP, but is not limited to this range. 【0059】 Furthermore, the aspect ratio can also be selected in the pixel count setting area 104. That is, the pull-down menu in the pixel count setting area 104 displays multiple options, each being a combination of the pixel count and aspect ratio of the image to be inspected. The user can select one of these options. Information regarding the selected pixel count is received by the interface unit 40c and sent to the processor 41 of the industrial camera 1 as a pixel count change instruction. 【0060】 When the processor 41 receives a pixel count change instruction, the calculation unit 41a calculates the scaling factor required to set the captured image corresponding to the same output area as before the pixel count change instruction as the second pixel count, within the field of view of the photoelectric conversion unit 31a. The scaling factor calculated by the calculation unit 41a is sent to the logic unit 31b, and the logic unit 31b generates an inspection target image with the second pixel count by downscaling the captured image by that scaling factor. If the aspect ratio is changed, the logic unit 31b generates an inspection target image with a changed aspect ratio by downscaling the area corresponding to the output area with the changed aspect ratio, within the field of view of the photoelectric conversion unit 31a. In other words, the logic unit 31b generates an inspection target image according to the combination of the pixel count and aspect ratio of the inspection target image selected in the pixel count setting area 104. 【0061】 Figure 16 illustrates the case where the zoom magnification can be handled by downscaling alone, i.e., where optical zoom is unnecessary. The upper part of Figure 16 shows the captured images E1 and E2, and the lower part shows the inspection target images E3 and E4. The field of view of the captured image E1 on the left and the captured image E2 on the right is kept constant, and signals from the black areas where the workpiece W does not exist are not read out in the captured image E2 on the right. As a result, the number of pixels in the captured image E1 on the left is 20MP, and the number of pixels in the captured image E2 on the right is 10MP. Downscaling the captured image E1 on the left with a scaling magnification of 4x yields the inspection target image E3 on the left. The inspection target image E3 on the left is an image obtained by outputting an area with 20MP of pixels with a number of pixels of 5MP. Also, since signals from the black areas of the captured image E2 on the right are not read out, it becomes possible to downscale it with a scaling magnification of 2x, yielding the inspection target image E4 on the right. The inspection target image E4 on the right is an image obtained by outputting an area with 10MP of pixels with a number of pixels of 5MP. Furthermore, by zooming in on the center of the image E3 on the left, a more detailed image E4 of the same subject can be obtained. 【0062】 In other words, even without using optical zoom, an inspection image E4 is obtained that displays the workpiece W enlarged while increasing the pixel resolution compared to the inspection image E3. In this specification, this zoom process is sometimes referred to as "sensor zoom". 【0063】 Figure 17 illustrates a situation where the zoom magnification exceeds a certain level, requiring both downscaling and optical zoom. The upper part of Figure 17 shows the captured image F1, the optically zoomed image F2, and the captured image F3, while the lower part shows the images to be inspected E4, E5, and E6. By optically zooming the area where the captured image F1 was generated, an optically zoomed image F2 with a narrow field of view is obtained. In the captured image F3 on the right, signals from the black areas where the workpiece W does not exist are not read out. The area enclosed by frame F7 in the captured image F3 on the right is designated as the area of ​​interest. The number of pixels in this area of ​​interest is 6MP. 【0064】 Downscaling the left image F1 with a scaling factor of 4x yields the left inspection target image F4. The central inspection target image F5 is an image acquired by optical zoom, and is therefore zoomed along the center of the field of view of the photoelectric conversion unit 31a. Consequently, if the center of the workpiece W is offset from the center of the field of view of the photoelectric conversion unit 31a, the workpiece W will be offset from the center of the image in the zoomed image. The central inspection target image F5 has improved pixel resolution. The right inspection target image F6 is an image obtained by downscaling the area of ​​interest enclosed by the frame F7 of the right image F3 with a scaling factor of 1.2x, resulting in a pixel count of 5MP. 【0065】 Figure 18 illustrates an example of combining optical zoom and downscaling, showing Pattern 1 and Pattern 2. In Pattern 1, from a low specified zoom magnification to a magnification near the downscaling limit, the optical zoom is turned off and zooming is performed by downscaling without using optical zoom. Downscaling is fixed at a magnification near the downscaling limit. When the magnification exceeds the downscaling limit, the optical zoom is turned on and zooming is performed up to the upper limit of the optical zoom magnification. At this time, as the specified zoom magnification increases, the optical zoom magnification also increases. When the upper limit of the optical zoom magnification is exceeded, the optical zoom is fixed and sensor zoom is performed by downscaling. According to Pattern 1, downscaling can be performed even after optical zooming (i.e., it is possible to retain sensor zoom capacity), so fine adjustments when determining the area to be ultimately output as the inspection target image can be performed by sensor zoom instead of optical zoom. 【0066】 In Pattern 2, zooming is performed by downscaling without optical zoom from a low zoom magnification range down to the downscaling limit magnification (1x). Since downscaling has been performed up to the downscaling limit magnification, no further downscaling is performed. When the downscaling limit magnification is exceeded, optical zoom is used to zoom up to the upper limit of the optical zoom magnification. 【0067】 In other words, as explained using Figures 16 to 18, the logic unit 31b is configured to generate an inspection target image by downscaling the second captured image with a second scaling magnification calculated based on the zoom magnification specified by the user via the interface unit 40c if the zoom magnification specified by the user via the interface unit 40c is less than or equal to a predetermined magnification. On the other hand, the logic unit 31b is configured to generate an inspection target image corresponding to the specified zoom magnification by optical zoom using the zoom optical system if the zoom magnification specified by the user via the interface unit 40c is greater than the predetermined magnification. The predetermined magnification can be a zoom magnification such that the second scaling magnification is a magnification near the scaling limit, close to 1x the lower limit. 【0068】 Furthermore, if the zoom magnification indicated by the user via the interface unit 40c is greater than the predetermined magnification, the calculation unit 41a performs optical zoom using the zoom optical system. The logic unit 31b generates an inspection target image at the indicated zoom magnification by performing downscaling at a magnification near the scaling limit. 【0069】 Furthermore, the interface unit 40c is configured to accept even higher zoom magnifications after the optical zoom's optical magnification has reached its upper limit. When the upper limit of the zoom magnification that the interface unit 40c can accept is reached, the calculation unit 41a drives the optical zoom at the upper limit optical magnification. The logic unit 31b then generates the inspection target image by downscaling the image corresponding to the output area captured at the upper limit optical magnification that the interface unit 40c can accept by a scaling factor of 1 (essentially without downscaling). In other words, when the calculation unit 41a receives a zoom magnification specification from the user, it calculates the optical magnification of the optical zoom and the scaling factor for downscaling based on the accepted zoom magnification. Then, it drives the zoom optical system based on the calculated optical magnification. 【0070】 Furthermore, the arithmetic unit 41a can receive a change in zoom magnification as a change instruction signal via the interface unit 40c. If the zoom magnification instructed based on the change instruction signal is less than or equal to the predetermined magnification, the arithmetic unit 41a sends a control signal to the image sensor 31 to perform downscaling of the captured image using the scaling magnification calculated by the arithmetic unit 41a, thereby causing downscaling to be performed. On the other hand, if the zoom magnification instructed based on the change instruction signal is greater than the predetermined magnification, a drive signal is sent to the zoom optical system, i.e., the zoom motor 56c, to perform optical zoom. The zoom motor 56c operates in response to the drive signal, and the desired zoom magnification is obtained. 【0071】 As shown in Figure 19, the aspect ratio of an image can be changed during downscaling. FIG. 19A and FIG. 19B show the case where a horizontally oriented area of ​​interest is changed to a vertically oriented area, but the opposite can also be done, where a vertically oriented area of ​​interest is changed to a horizontally oriented area. This change instruction can be made by the user via the pixel count setting area 104 of the user interface screen 100 shown in Figure 11. However, as shown in FIG. 19B, due to the constraints of the shape of the photoelectric conversion unit 31a, it is possible that the area of ​​interest may be located outside the range that can be imaged by the photoelectric conversion unit 31a when the aspect ratio is changed. In this case, the calculation unit 41a recalculates the scaling factor during downscaling to satisfy the aspect ratio as much as possible, and the logic unit 31b generates the inspection target image by downscaling with the recalculated scaling factor. 【0072】 As shown in Figure 20, the number of pixels can be increased or decreased during downscaling based on user settings. Figures 20A, 20B, and 20C show cases where the number of pixels is changed without changing the spatial resolution (scaling ratio). In Figures 20A and 20B, the number of pixels is changed within the range that can be imaged by the photoelectric conversion unit 31a, so the calculation unit 41a calculates a scaling ratio that reflects the user settings, and the logic unit 31b performs downscaling with the calculated scaling ratio to generate the image to be inspected. On the other hand, in Figure 20C, if the user settings are reflected, it will exceed the range that can be imaged by the photoelectric conversion unit 31a, so the calculation unit 41a calculates a scaling ratio that limits the change in the number of pixels without using the user settings. During calculation, the scaling ratio is made to be as close as possible to the user settings. Then, the logic unit 31b performs downscaling with the calculated scaling ratio to generate the image to be inspected. 【0073】 Figures 20D, 20E, and 20F illustrate cases where the number of pixels is changed without changing the imaging field of view. In Figures 20D and 20E, since the change is to a number of pixels greater than or equal to the minimum resolution, the calculation unit 41a calculates a scaling factor that reflects the user's settings, and the logic unit 31b generates the image to be examined by downscaling using the calculated scaling factor. On the other hand, in Figure 20F, since the change is to a number of pixels less than the minimum resolution, the calculation unit 41a calculates a scaling factor that limits the change in the number of pixels without using the user's settings, and the logic unit 31b generates the image to be examined by downscaling using the calculated scaling factor. In other words, the calculation unit 41a is configured to limit the change from the first number of pixels to the second number of pixels based on the user's settings. 【0074】 Furthermore, the interface unit 40c is configured to accept a second zoom instruction to further reduce the output area to a relatively smaller area after the user has given an instruction to change the number of pixels, and a second pan-tilt instruction to further adjust the output area in the X and Y directions. The second zoom instruction can be accepted by the user in the same way as the first pan-tilt instruction. Similarly, the second pan-tilt instruction can be accepted by the user in the same way as the first pan-tilt instruction. 【0075】 When the interface unit 40c receives a second zoom instruction and a second pan-tilt instruction, the calculation unit 41c calculates the scaling factor required to set the captured image corresponding to the output area modified by at least one of the second zoom instruction and the second pan-tilt instruction to a second pixel count within the field of view of the photoelectric conversion unit 31a. The logic unit 31b generates an inspection target image with a second pixel count by downscaling the captured image using the scaling factor calculated by the calculation unit 41c. 【0076】 Figure 21 illustrates an example of generating an inspection target image after rotation, and shows the rotation setting user interface screen 110. The rotation setting user interface screen 110 includes an image display area 111 where the inspection target image corresponding to the output area of ​​the photoelectric conversion unit 31a is displayed, and a rotation angle setting area 112. In the rotation angle setting area 112, it is possible to set the rotation direction and rotation angle of the image, and these settings can be configured by the user using the keyboard 7 or mouse 8. 【0077】 Once the rotation direction and rotation angle are set in the rotation angle setting area 112, the calculation unit 41a rotates the image to be inspected in the set direction by the set angle, while keeping the number of pixels and shape of the image to be inspected fixed. In other words, the calculation unit 41a applies a rotation transformation process of an arbitrary angle to the image to be inspected. This allows the rotated image to be generated and displayed in the image display area 111, so that, for example, if the industrial camera 1 is installed in a tilted direction, the tilt can be corrected in software. 【0078】 Figure 22 shows an example of how downscaling is performed by the processor 41. As shown in this figure, the lens unit is a non-zoom lens that cannot perform optical zoom. The image sensor 31 outputs the image captured by the photoelectric conversion unit 31a to the processor 41 without downscaling. The processor 41 is provided with a downscaling unit 41A, which performs the downscaling described above to generate the image to be inspected. Other processing is the same as when downscaling is performed by the image sensor 31. 【0079】 (Processing of color images) Since the image sensor 31 can generate a color image, the interface unit 40c can accept the specification of an output area, which is the area to be output as a color inspection target image within the field of view of the photoelectric conversion unit 31a. 【0080】 The image sensor 31 has a color filter 31c, which enables the generation of a color image where each color is formed in a predetermined array pattern. Specifically, the array pattern of the color image output by the photoelectric conversion unit 31a is a Bayer array, as shown in Figure 23. In a Bayer array, in addition to the red component (R pixel) and blue component (B pixel), a first green component (Gr pixel) and a second green component (Gb pixel) are arranged in a predetermined array pattern. The array pattern is not limited to a Bayer array and may be other array patterns. 【0081】 Furthermore, the photoelectric conversion unit 31a is configured to generate color inspection target images with different pixel counts. When a color image is generated by the photoelectric conversion unit 31a, the processor 41 performs the aforementioned calculations and image processing on the color inspection target image. In this example, since a color filter 31c is included, a color image can be generated without using a three-chip camera and without lighting up RGB in a time series. 【0082】 The logic unit 31b acquires a color image corresponding to the output area of ​​the field of view of the photoelectric conversion unit 31a, then individually downscales each color of the color image based on the array pattern, and arranges the pixel values ​​of each color after downscaling so that the array pattern of each color matches the array pattern of the color image. This makes it possible to generate a color inspection target image with a smaller number of pixels than the number of pixels in the color image. 【0083】 For example, as shown in Figure 23, the logic unit 31b individually downscales the red component, the first green component adjacent to the red component in the row direction, the blue component, and the second green component adjacent to the blue component in the row direction, all of which are included in the Bayer array of the color image. The logic unit 31b then generates a color inspection target image by arranging the pixel values ​​of each color of the downscaled blue component, the first green component, the red component, and the second green component so that the array pattern of each color matches the array pattern of the Bayer array of the color image. 【0084】 In other words, when a user specifies an area to be output as a color inspection target image, each color in the corresponding color image is individually downscaled based on a predetermined array pattern. The pixel values ​​of each color after downscaling are arranged so that the array pattern of each color matches the array pattern of the color image. This makes it possible to generate a color inspection target image with any number of pixels smaller than the number of pixels in the color image, eliminating the need for additional processing in subsequent image processing by processors or FPGAs due to mismatches in array patterns. 【0085】 To give a specific example, the logic unit 31b is configured to generate a color inspection target image by downscaling each color of the captured color image in a first direction, which is either the X or Y direction, and then downscaling the image obtained by downscaling in the first direction in a second direction, which is the other direction of the X or Y direction. More specifically, as shown in Figure 24, the logic unit 31b generates a color inspection target image by downscaling each color of the captured color image in a first direction, and then downscaling the image obtained by downscaling in the first direction in a second direction. In Figure 24, the Gr pixel is interpolated and downscaled in the first direction, the horizontal direction (X direction), and then interpolated and downscaled in the second direction, the vertical direction (Y direction). Similarly, the R, B, and Gb pixels are interpolated and downscaled in the horizontal direction, and then interpolated and downscaled in the vertical direction, respectively. 【0086】 As shown in Figure 25 for the horizontal direction, when interpolating pixels, the average of the values ​​of two adjacent pixels of the same color is calculated. Furthermore, during downscaling, a weighted average is calculated based on the subpixel size of each pixel in the pre-downscaling image, contained within each pixel of the image to be inspected after downscaling. In Figure 25, α, β, and γ represent the subpixel size when the input pixel size is set to 1. Also, since α and γ can each be set to values ​​less than 1, the scaling factor can be calculated with decimal precision. The same process is performed on other R pixel groups in the image. Although Figure 25 shows the R pixels, the same applies to pixels of other colors. 【0087】 Similarly, the same processing is performed in the vertical direction using the pixels after horizontal downscaling. In other words, the logic unit 31b calculates the pixel value of each pixel in the image to be inspected based on multiple pixels of the same color that exist in the vicinity of the position in the color image before downscaling, corresponding to each pixel in the image to be inspected after downscaling. The logic unit 31b then determines the vicinity of the color image based on the scaling factor of the downscaling. 【0088】 As shown in Figure 26, a low-pass filter can also be applied when processing color images. In this case, the downscaling is performed by considering each pixel of the downscaled image to be inspected as being enlarged by the specified low-pass filter area (LPF area). The low-pass filter area is applied equally to both sides of the downscaled pixel. The low-pass filter area (subpixel size) on each side is calculated by multiplying the reduction due to downscaling by the low-pass filter setting value and then dividing the result by 1 / 2. The low-pass filter setting value must be greater than or equal to 0 and smaller than the value obtained by {3 × (reduction - 1)} / reduction. In Figure 26, α, β, γ, and δ indicate the subpixel size when the size of the input pixel is set to 1. The same processing is also performed on other R pixel groups in the image. Although Figure 26 shows the R pixels, the same applies to pixels of other colors. 【0089】 Furthermore, when the processor 41 receives an instruction from the interface unit 40c to change the number of pixels, it matches the arrangement patterns of each color in the color inspection target image before and after the change in the number of pixels. This allows image processing of the color inspection target image after the change to be performed without changing the settings related to the arrangement patterns of each color in the image processing of the color inspection target image before the change. 【0090】 When the interface unit 40c receives an instruction to change at least one of the position, size, and shape of the output area, the logic unit 31b generates a color inspection target image corresponding to the modified output area, such that the arrangement pattern of each color matches that of the color inspection target image generated before the change in the output area. 【0091】 Furthermore, the logic unit 31b downscales the color image so that the transfer speed of the color inspection target image to the processor 41 is relatively faster compared to the transfer speed of the color image image to the processor 41. That is, as shown in Figure 22, it is also possible to downscale outside the image sensor 31, but in this case, the amount of data in the color image image is large, so the transfer speed to the processor 41 may become a problem. By downscaling the color image image and transferring the color inspection target image to the processor 41 at a speed faster than the transfer speed of the color image image to the processor 41, the processing speed can be increased, enabling image inspection of fast-moving objects. In addition, the transfer speed from the logic unit 31b to the processor 41 can be changed according to the number of pixels in the inspection target image output from the image sensor 31. 【0092】 (Setup flow) As described above, the image inspection system 2 equipped with the industrial camera 1 can perform various processes, and the procedures for these processes can be arbitrarily set as long as they do not result in inconsistencies. Below, an example of a processing procedure will be explained based on a flowchart. 【0093】 Figure 27 is a flowchart showing an example of the processing procedure when inputting the zoom magnification. In step SA1 after startup, the imaging settings are activated. When the imaging settings are activated, the second lens group 22 is moved to the wide-angle side. In step SA2, the interface unit 40c receives the zoom magnification input from the user. When inputting the zoom magnification, the user interface screen 100 shown in Figure 11 is used, and the zoom can be input by operating the zoom adjustment area 101A. As another example, the zoom magnification may also be entered numerically. 【0094】 Step SA3 determines whether the input value (zoom magnification) from Step SA2 is greater than the first zoom value (first zoom magnification). If the result is NO, the process proceeds to Step SA4 to change the downscaling setting. When a trigger signal is input in Step SA5, the process proceeds to Step SA6 to display the image to be inspected. 【0095】 If the result in step SA3 is YES, proceed to step SA7 to determine whether the input value (zoom magnification) in step SA2 is greater than the second zoom value (second zoom magnification). If the result is NO, proceed to step SA8 to fix the downscaling at the default zoom magnification, and any further zoom will be handled by optical zoom in step SA9. Then proceed to step SA5. 【0096】 If the result in step SA7 is YES, then in step SA10 the optical zoom magnification is set to the maximum, the downscaling magnification is set to 1, and the process proceeds to step SA9. 【0097】 Figure 28 is a flowchart showing an example of the processing procedure when specifying the field of view or resolution. In step SB1 after the start, the WD measurement button (not shown) on the user interface is pressed. In step SB2, the WD measurement is performed. In step SB3, the field of view and resolution are calculated based on the internal data pre-stored in the industrial camera 1 and the current focal position information. In step SB4, the user inputs either the X field of view, Y field of view, or spatial resolution via the user interface. In step SB5, the zoom magnification is calculated using the value input in step SB4. In step SB6, it is determined whether the zoom magnification calculated in step SB5 is a configurable zoom magnification. If it is determined to be NO in step SB6, the process will proceed as shown in FIG. 19B in Figure 19 and FIG. 20C and 20F in Figure 20, and the process will proceed to step SB7 to clip to a configurable zoom magnification. If it is determined to be YES in step SB6, the process will proceed to step SB8 and the same procedure as the flow shown in Figure 27 will be executed. 【0098】 Figure 29 is a flowchart showing an example of the pan-tilt processing procedure. In step SC1 after the start, the user adjusts the position up, down, left, and right by operating the field of view position adjustment area 103 on the user interface screen 100 shown in Figure 11. In step SC2, it is determined whether the area adjusted in step SC1 is narrower than the maximum field of view of the image sensor 31. If it is determined to be NO in step SC2, the maximum range is clipped in step SC3. Then, the process proceeds to step SC4 to change the position of the area of ​​interest. If it is determined to be YES in step SC2, the process also proceeds to step SC4. 【0099】 Figure 30 is a flowchart showing an example of the process for changing the aspect ratio. In step SD1 after the start, the user changes the aspect ratio to the desired one by operating the pixel count setting area 104 on the user interface screen 100 shown in Figure 11. In step SD2, it is determined whether the changed pixel area is within the field of view of the image sensor 31 at the same scaling magnification. If it is determined to be NO, the process proceeds to step SD3, where the zoom magnification is changed to match the aspect ratio changed in step SD1. In step SD4, the same procedure as shown in Figure 27 is performed. After that, the process proceeds to step SD5, where the size of the area of ​​interest is changed. If it is determined to be YES in step SD2, the process also proceeds to step SD5. 【0100】 The embodiments described above are merely illustrative in all respects and should not be interpreted restrictively. Furthermore, any modifications or changes that fall within the equivalent scope of the claims are all within the scope of the present invention. [Industrial applicability] 【0101】 As described above, the industrial camera according to the present invention can be used to generate inspection target images for inspecting various objects. [Explanation of Symbols] 【0102】 1 Industrial Camera 20 Lens Units 31 Image Sensor 31a Photoelectric conversion unit 31b Logic section 31c color filter 40c Interface Section 41 processors 41a Arithmetic unit 42 Output section 50 cabinets

Claims

[Claim 1] An industrial camera that captures an image of an object to be inspected and generates an image of the object to be inspected, A photoelectric conversion unit capable of generating an image with a larger number of pixels than the aforementioned image to be inspected, An image sensor having a logic unit which is mounted on the same chip as the photoelectric conversion unit and which generates an inspection target image with a smaller number of pixels than the captured image by performing downscaling on the captured image corresponding to the output region which is all or part of the pixel group of the photoelectric conversion unit, and outputs the inspection target image, An interface unit that receives a zoom command for any position within the field of view of the photoelectric conversion unit, A processor that calculates a scaling factor based on the zoom instruction, outputs the scaling factor to the logic unit, and controls the image sensor, An output unit that outputs the image of the object to be inspected, output from the image sensor, An industrial camera comprising the image sensor, the processor, and a housing that houses the output unit. [Claim 2] In the industrial camera described in claim 1, The logic unit is configured to transfer the image to be inspected to the processor. An industrial camera characterized by downscaling the captured image so that the transfer speed when transferring the image to be inspected, generated by the logic unit, to the processor is relatively faster than the transfer speed when transferring the captured image generated by the photoelectric conversion unit to the processor. [Claim 3] In the industrial camera described in claim 1, A condensing lens that collects light incident from a light-receiving window in the housing, The lens driving mechanism drives the aforementioned condensing lens in the optical axis direction and adjusts the focal position and optical magnification, The photoelectric conversion unit is characterized by being a CMOS type image sensor having a number of pixels greater than the number of pixels required to receive light focused by the focusing lens and generate the inspection target image, in an industrial camera. [Claim 4] In the industrial camera described in claim 1, The interface unit accepts the selection of the number of pixels in the image to be inspected, An industrial camera characterized in that the transfer speed from the logic unit to the processor increases in accordance with the number of pixels in the image to be inspected output from the image sensor, as the number of pixels selected decreases. [Claim 5] In the industrial camera according to Claim 1, The interface unit accepts the selection of the number of pixels in the image to be inspected, The industrial camera is characterized in that the processor calculates the scaling ratio based on the number of pixels and the zoom instruction.