Scale plate posture inspection method, recording medium, scale plate posture inspection apparatus, and computer program product

Through the scale plate posture inspection method, image data is acquired by a camera and compared and processed, the problem of inability to distinguish the measurement device itself from the inspection method in the prior art is solved, the accuracy of error inspection is improved, and time and cost are reduced.

CN119223129APending Publication Date: 2024-12-31MITUTOYO CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410842334.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-06-30
Filing Date
2024-06-27
Publication Date
2024-12-31

AI Technical Summary

Technical Problem

The existing dial gauge inspection methods cannot distinguish between defects in the measuring device itself and problems in the inspection methods, resulting in the inability to accurately identify the source of defects during error inspection, which increases the time and cost of investigating and replacing parts.

Method used

Through the scale plate posture inspection method, image data is obtained by the camera, contrast areas are extracted and contrasted based on brightness or color, and the relative posture between the camera and the scale plate is determined to ensure accurate calibration of the measurement device.

Benefits of technology

Effectively distinguish the defects of the measuring device itself from problems in the inspection method, improve the accuracy of error inspection and reduce unnecessary time and cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119223129A_ABST
    Figure CN119223129A_ABST
Patent Text Reader

Abstract

The invention discloses a scale plate posture inspection method, a recording medium, a scale plate posture inspection apparatus, and a computer program product. The scale plate posture inspection method includes an image data acquisition step for acquiring image data relating to a scale plate from a camera, a region calculation step for extracting a first comparison region and a second comparison region in the image data; and a comparison processing step for comparing the first comparison region with the second comparison region on the basis of brightness or color. The comparison processing step includes calculating a difference between pixel values or luminance values of adjacent pixels in each of the first comparison region and the second comparison region to compare a magnitude of the difference in the first comparison region with a magnitude of the difference in the second comparison region. The relative posture between the camera and the scale plate is checked on the basis of the comparison result in the comparison processing step.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a scale plate posture inspection method, a recording medium, a scale plate posture inspection device and a computer program product. Background Art

[0002] For example, a micrometer is a measuring device that displays measured values ​​in analog form. Precision measuring devices such as micrometers are inspected before product shipment or periodically by the measuring device manufacturer or inspection agency to ensure measurement accuracy and precise calibration.

[0003] Patent Document 1: JP 2017-067628A Summary of the invention

[0004] In the inspection of the micrometer, the spindle of the micrometer to be inspected is displaced by a predetermined amount by a gauge inspection device (main measuring device), and the indication value is compared between the micrometer to be inspected and the main measuring device to measure the indication error. However, even if the micrometer is found to have an indication error defect in this inspection method, it is impossible to distinguish whether the defect is caused by the micrometer itself or by some problem in the inspection method. If there is a problem with the inspection method, even a measuring device that initially passed the inspection will not pass the inspection of the defect in the scale plate or the accuracy of the measuring device, and this leads to problems such as the time and cost used to investigate the cause of the problem and replace parts, which were originally unnecessary.

[0005] An object of the present invention is to provide a scale plate posture verification method for verifying the relative posture between a camera and a scale plate.

[0006] A scale plate posture verification method according to an exemplary embodiment of the present invention is a scale plate posture verification method for verifying a relative posture between a camera and a scale plate, the scale plate posture verification method comprising:

[0007] An image data acquisition step for acquiring image data related to the scale plate from the camera;

[0008] an area calculation step for extracting a first contrast area and a second contrast area from the image data; and

[0009] a contrast processing step for comparing the first contrast area with the second contrast area based on brightness or color,

[0010] The relative posture between the camera and the scale plate is checked based on the comparison result in the comparison processing step.

[0011] In an exemplary embodiment of the present invention, it is preferred that the first contrast area and the second contrast area are located on opposite sides of each other at the center of the scale plate or a virtual straight line passing through the center of the scale plate is between the first contrast area and the second contrast area.

[0012] In an exemplary embodiment of the present invention, it is preferred that the first contrasting area and the second contrasting area each include a background color portion of the scale plate and a printed or engraved mark.

[0013] In an exemplary embodiment of the present invention, preferably, the contrast processing step includes: calculating the difference between pixel values ​​or brightness values ​​of adjacent pixels in each of the first contrast area and the second contrast area to compare the size of the difference in the first contrast area with the size of the difference in the second contrast area.

[0014] In an exemplary embodiment of the present invention, preferably, before performing the area calculation step, the scale plate posture verification method further includes:

[0015] A brightness adjustment step for adjusting illumination and camera exposure so that the exposure time of the camera is longest within a range where the brightness of pixels in the image data is not saturated, and the number of pixels having a brightness higher than a predetermined threshold is a predetermined fixed count value or more.

[0016] In an exemplary embodiment of the present invention, preferably, the area calculation step includes:

[0017] a center calculation step for calculating the center of the scale plate, and

[0018] The center calculation step includes:

[0019] calculating a line connecting the first pair of scales at point-symmetric positions with respect to a center between the first pair of scales and a line connecting the second pair of scales at point-symmetric positions with respect to a center between the second pair of scales; and

[0020] An intersection point of a line connecting the first scale pair and a line connecting the second scale pair is set as the center of the scale plate.

[0021] In an exemplary embodiment of the present invention, preferably, the center calculation step includes:

[0022] searching edge coordinates on one side from one side of each scale in the width direction using a predetermined algorithm, and searching edge coordinates on the other side from the other side of the scale in the width direction using the same algorithm having a different orientation from the predetermined algorithm; and

[0023] A line for connecting each scale pair is calculated by setting a midpoint between the edge coordinates of the one side and the edge coordinates of the other side as the center coordinate of the width of each scale and connecting the center coordinates of each scale pair.

[0024] The scale plate posture checking program according to the exemplary embodiment of the present invention causes a computer to execute:

[0025] An image data acquisition step for acquiring image data related to the scale plate from a camera;

[0026] an area calculation step for extracting a first contrast area and a second contrast area from the image data; and

[0027] a contrast processing step for comparing the first contrast area with the second contrast area based on brightness or color,

[0028] The relative posture between the camera and the scale plate is checked based on the comparison result in the comparison processing step.

[0029] A scale plate posture verification device according to an exemplary embodiment of the present invention is a scale plate posture verification device for verifying a relative posture between a camera and a scale plate, the scale plate posture verification device comprising:

[0030] An image data acquisition unit, used for acquiring image data related to the scale plate from the camera;

[0031] A region calculation unit, configured to extract a first comparison region and a second comparison region from the image data; and

[0032] a contrast processing unit, configured to compare the first contrast area with the second contrast area based on brightness or color,

[0033] The relative posture between the camera and the scale plate is checked based on the comparison result of the comparison processing unit.

[0034] In an exemplary embodiment of the present invention, it is preferred that a base plate is provided which extends from a bracket portion for holding a measuring device to be inspected including a scale plate to be inspected, and

[0035] The camera is mounted on the base plate.

[0036] In an exemplary embodiment of the present invention, it is preferred that the bracket portion is mounted on a standard gauge so that relative positions and postures of the measurement device to be inspected, the standard gauge, and the camera can be fixed. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 is a system configuration diagram showing a measuring device inspection apparatus;

[0038] Figure 2 is a functional block diagram showing an arithmetic processing device;

[0039] Figure 3 is a block diagram showing a scale plate posture checking unit;

[0040] Figure 4 is a flow chart for explaining the overall process of operation of the scale plate posture inspection method;

[0041] Figure 5 is a flow chart for explaining the process of brightness adjustment steps;

[0042] Figure 6 is a flow chart for illustrating the steps of area calculation;

[0043] Figure 7 is a flow chart for illustrating the process of calculating the center of a scale plate;

[0044] Figure 8 is a flowchart for explaining a process of calculating the center coordinate value of a scale in the width direction;

[0045] Fig. 9 is a flowchart for explaining a process of calculating the center coordinate value of a scale in the width direction;

[0046] Fig.10 is a flow chart for explaining the process of the contrast region extraction step;

[0047] Fig.11 is a flow chart for illustrating the process of contrast processing steps;

[0048] Fig.12 is a flow chart for explaining the process of filtering processing steps;

[0049] Fig.13 is a flowchart for explaining the process of the tilt determination step;

[0050] Fig.14 is a diagram showing an example of a process for calculating the center of a scale plate;

[0051] Fig.15 It is an enlarged view of the scale;

[0052] Fig.16 is a diagram showing an example of a first comparison area and a second comparison area;

[0053] Fig.17is a diagram schematically showing changes in brightness difference when a one-dimensional differential filter is applied along a scale vertical line;

[0054] Fig.18 is a diagram showing an example of a guide display; and

[0055] Fig.19 is a diagram showing an example of a guide display.

[0056] Description of Reference Numerals

[0057] 100 measuring device inspection equipment 10 measuring device (measuring device to be inspected) 200 scale plate

[0058] 12 pointers

[0059] 11 Contact Points

[0060] 20 standard gauge

[0061] 21 cover

[0062] 22 reference spindle

[0063] 23 Encoder

[0064] 30 Bracket

[0065] 31 columns

[0066] 32 Bracket

[0067] 33 base plate

[0068] 34 Lighting installation table

[0069] 35 Camera Mounting Stand

[0070] 40 Cameras

[0071] 50 lighting units

[0072] 300 Arithmetic Processing Unit

[0073] 310 Inspection execution unit

[0074] 400 scale plate posture inspection unit

[0075] 410 brightness adjustment unit

[0076] 420 Image data acquisition unit

[0077] 430 Area Computing Unit

[0078] 431 Central Computing Unit

[0079] 432 contrast area extraction unit

[0080] 440 contrast processing unit

[0081] 441 filter processing unit

[0082] 442 Tilt Judgment Unit

[0083] 450 GUIDE UNIT DETAILED DESCRIPTION

[0084] Embodiments of the present invention are shown and described with reference to reference numerals assigned to elements in the drawings.

[0085] (First Exemplary Embodiment)

[0086] A measuring device inspection apparatus according to a first exemplary embodiment of the present invention is described below.

[0087] The measuring device inspection apparatus 100 inspects a measuring device 10 such as a (analog display type) micrometer, which is used to display a measurement value in an analog form using, for example, a disc-shaped scale plate 200 and a rotating pointer. (The micrometer may be referred to as an indicator or a test indicator.)

[0088] Precision measuring devices 10 such as micrometers are regularly inspected by measuring device manufacturers or inspection agencies to ensure measurement accuracy and precise calibration. The measuring device inspection apparatus 100 according to the present exemplary embodiment inspects whether the installation posture of the measuring device inspection apparatus 100 and the measuring device 10 is appropriate (conducting a scale plate posture inspection) before inspecting the measuring device 10 itself (conducting a defect inspection of the disc-shaped scale plate 200 or an indication value error inspection).

[0089] Figure 1 is a diagram showing a system configuration of the measuring device inspection apparatus 100 .

[0090] The measuring device inspection equipment 100 includes a standard gauge 20 used as a reference for the measuring device indication value, a bracket part 30 for mounting the measuring device 10 to be inspected on the standard gauge 20, a camera 40 for photographing the analog display unit 200 of the measuring device 10 to be inspected, a lighting unit 50 for illuminating the analog display unit 200 of the measuring device 10 to be inspected, and an arithmetic processing device 300.

[0091] The standard gauge 20 includes a reference spindle 22 that moves back and forth and a precisely calibrated high-precision encoder (displacement detector) 23. The reference spindle 22 displaces the contact point 11 of the measuring device 10 to be inspected, and the high-precision encoder 23 detects the displacement of the reference spindle 22. The difference between the indicated value of the standard gauge 20 (the detected value of the high-precision encoder 23) and the indicated value of the measuring device 10 to be inspected is the error of the measuring device 10 to be inspected.

[0092] In the present exemplary embodiment, under the assumption that the indicated value error inspection is performed after the scale plate posture inspection and the scale plate defect inspection, the measuring device inspection apparatus 100 includes the standard gauge 20. However, if only the scale plate defect inspection is performed as the inspection of the measuring device 10 and the indicated value error inspection using the standard gauge 20 is not performed, the standard gauge 20 is unnecessary. That is, the standard gauge 20 is an additional element in the present invention and is not essential.

[0093] The support portion 30 includes a column 31 and a bracket portion 32. The column 31 is mounted on the cover portion 21 of the standard gauge 20, and the bracket portion 32 is provided to be movable along the column 31. The bracket portion 32 includes an arm portion extending orthogonally to the column 31, and holds the measuring device 10 to be inspected at the front end of the arm portion. Specifically, a portion of the measuring device 10 to be inspected (at Figure 1 In the embodiment, the rod of the micrometer is held at the front end of the bracket portion 32.

[0094] When the master gauge 20 is not used, a so-called stand including the column 31 provided on a base in an upright manner is prepared, and the stand (base) is installed on a workbench or the like.

[0095] The camera 40 includes a lens optical system and an image sensor such as a CCD or a CMOS. The camera 40 is installed so as to photograph the scale plate 200 of the measuring device 10 to be inspected from the front. That is, the camera 40 is installed so as to photograph the scale plate 200 of the measuring device 10 to be inspected held by the bracket part 30 from the front. In the present exemplary embodiment, the camera 40 is fixedly installed, and the relative posture and relative position between the camera 40 and the measuring device 10 to be inspected are assumed to be adjusted by adjusting the orientation (tilt) and position of the measuring device 10 to be inspected. Since the ultimate goal is to adjust the posture in a manner that the camera 40 and the measuring device 10 to be inspected (scale plate 200) are facing each other, the orientation (tilt) and position of the camera 40 are also adjustable.

[0096] Here, the camera 40 and the measuring device 10 (scale plate 200) are ideally facing each other, which means that when the surface of the scale plate 200 is regarded as a plane, the optical axes of the scale plate 200 and the camera 40 are orthogonal. It can also be said that the normal line of the scale plate 200 and the optical axis of the camera 40 are parallel.

[0097] Illumination unit 50 is, for example, a ring-shaped illumination, and illuminates scale plate 200 of measuring device 10 to be inspected in such a manner that uneven brightness due to shadows does not occur.

[0098] In the present exemplary embodiment, the long plate-like base plate 33 is attached to the column 31 of the stand portion 30, and the camera 40 and the lighting unit 50 are mounted on the base plate 33. That is, the lighting mounting stand 34 and the camera mounting stand 35 are provided on the base plate 33 to fixedly mount the lighting unit 50 and the camera 40 relative to the stand portion 30 holding the measuring device 10 to be inspected. Preferably, the lighting mounting stand 34 and the camera mounting stand 35 can be moved forward and backward or left and right to the extent that their positions can be adjusted relative to the base plate 33, and their positions can be fixed with set screws or the like.

[0099] When the bracket part 30 is mounted on the standard gauge 20, the relative positions and postures between the standard gauge 20, the measuring device 10 to be inspected, the lighting unit 50 and the camera 40 can be fixed. When inspecting the accuracy of the measuring device 10 to be inspected, the accuracy can be inspected in different postures such as vertical, horizontal and reverse postures. In this case, the standard gauge 20 and the measuring device 10 to be inspected are tilted into a horizontal posture, rotated into a reverse posture, or changed into various other postures, in which case the lighting unit 50 and the camera 40 move together with the standard gauge 20, the bracket part 30 and the measuring device 10 to be inspected. Therefore, once the brightness and posture are adjusted, there is no need to readjust them even if the inspection posture changes.

[0100] In the present exemplary embodiment, it is assumed that the base plate 33 is attached to the column 31 at a right angle, the camera mounting stand 35 is attached to the base plate 33 at a right angle, and the camera 40 is attached to the camera mounting stand 35 at a right angle. Therefore, when the measuring device 10 to be inspected (e.g., a dial gauge) is attached to the bracket portion 30, the vertical axis (axis parallel to the main axis and the rod) of the measuring device 10 to be inspected is orthogonal to the optical axis of the camera 40. In the present exemplary embodiment, the tilt in the left-right direction (rotation using the axis parallel to the main axis and the rod as the rotation axis) will be checked. The method in the present exemplary embodiment can also be applied to the vertical direction to correct the tilt in the vertical and horizontal directions.

[0101] The arithmetic processing device 300 is typically a small computer having a keyboard, a mouse, a microphone, a display, a printer, and a speaker built into or outside the computer body as input / output devices. Alternatively, the arithmetic processing device 300 may be a tablet device or a smartphone (portable high-performance phone).

[0102] Figure 2 is a functional block diagram showing the arithmetic processing device 300 .

[0103] The arithmetic processing device 300 includes a central processing unit (CPU) and a memory (ROM, RAM), etc., and the CPU executes a test program to perform the functions of the functional unit. The test program can be distributed by recording on a non-volatile recording medium (CD-ROM or memory card, etc.) or downloaded via an Internet connection, etc.

[0104] The arithmetic processing device 300 includes a test execution unit 310 for executing various tests of the measuring device 10. The test execution unit 310 includes a scale plate posture inspection unit 400, a scale plate defect detection unit 320, and an indication value error evaluation unit 330.

[0105] Here, the scale plate posture verification unit 400 verifies the relative posture between the camera 40 and the scale plate 200 based on the image data about the scale plate 200 captured by the camera 40. The details will be described later.

[0106] The scale plate defect detection unit 320 detects defects such as deformation, scratches, missing scales, and scale intervals on the scale plate 200 from image data about the scale plate 200 photographed by the camera 40 .

[0107] At this time, if the scale plate 200 is tilted relative to the camera 40, the scale plate 200 or the scale cannot be correctly inspected based on the image data. That is, even if there is a defect in the scale plate 200 or the scale in the image data, it is necessary to distinguish whether the defect is in the measuring device to be inspected itself or the image data is originally distorted. The indication value error evaluation unit 330 evaluates the difference between the indication value of the standard gauge 20 (the detection value of the high-precision encoder 23) and the indication value of the measuring device to be inspected 10. At this time, it is assumed that the analog display unit 200 of the measuring device to be inspected 10 is photographed by the camera 40, and the indication value is automatically read from the photographed data. In this case, if the scale plate 200 is tilted relative to the camera 40, the image data has parallax for the tilt amount, and the reading of the indication value of the pointer will have a difference. If there is a difference between the indication value of the pointer of the measuring device 10 to be inspected and the indication value of the standard gauge 20, it is necessary to distinguish whether the difference is due to a defect in the internal mechanism of the measuring device 10 to be inspected or a parallax problem when the image data is acquired.

[0108] Since the measuring device 10 to be inspected displays the measured value with a micron-level resolution, according to the verification of the inventors, when the relative posture between the camera 40 and the measuring device 10 to be inspected deviates by about 5° from the facing posture, this will interfere with the scale plate defect detection or the indication value error evaluation, and it is considered ideal to keep the deviation of the relative posture between the camera 40 and the measuring device 10 to be inspected within 3°. Such a deviation of 3° or 5° is not noticeable to the human eye. For this reason, the scale plate posture inspection step is performed before the scale plate defect detection or the indication value error evaluation.

[0109] Figure 3 is a block diagram showing the scale plate posture verification unit 400 .

[0110] The scale plate posture verification unit 400 includes a brightness adjustment unit 410, an image data acquisition unit 420, an area calculation unit 430, a contrast processing unit 440, and a guide unit 450. The area calculation unit 430 includes a center calculation unit 431 and a contrast area extraction unit 432. The contrast processing unit 440 includes a filter processing unit 441 and a tilt determination unit 442.

[0111] The operations of the respective functional units are described later with reference to the flowcharts.

[0112] The process of the scale plate posture inspection method according to the first exemplary embodiment is described in sequence. Before performing the scale plate posture inspection method, the operator mounts the measuring device 10 to be inspected on the bracket part 30, and adjusts the measuring device 10 to be inspected and the camera 40 so that they are as directly opposite to each other as possible. The camera 40 can be focused on the scale plate 200 of the measuring device 10 to be inspected, the lighting and exposure can be set to preset default settings, and the automatic adjustment (automatic focus and exposure adjustment) of the camera 40 can be activated as an initial adjustment. The installation (replacement) of the measuring device 10 to be inspected on the bracket part 30 and the setting of the camera 40 can be performed automatically by a robot, rather than manually by an operator.

[0113] Figure 4 1 is a flowchart for explaining the overall procedure of the operation of the scale plate posture checking method according to the first exemplary embodiment.

[0114] like Figure 4 As shown, the scale plate posture inspection method includes a brightness adjustment step ST1000, a camera step ST2000, an area calculation step ST3000, a contrast processing step ST4000 and a guide display step ST5000.

[0115] These steps are described in order below.

[0116] Figure 5It is a flowchart for explaining the process of brightness adjustment step ST1000.

[0117] Considering the subsequent steps, it is desirable that the image data related to the reticle 200 uses the widest possible brightness range. Therefore, the illumination and exposure are adjusted in such a manner that the image data is brightened to the limit within a range where the brightness of the pixels in the image data is not saturated.

[0118] First, the brightness of the lighting unit 50 is set to a predetermined initial value (ST1100), and the exposure time of the camera 40 is set to a minimum (ST1200). Minimizing the exposure time of the camera 40 means minimizing the exposure time within the specifications of the camera 40, in other words, setting the shutter speed to the fastest possible speed. Setting the brightness of the lighting unit 50 to an initial value can be considered as, for example, setting the current or voltage value to be applied to the lighting unit 50 to a predetermined initial value. Alternatively, an illuminometer can be placed near the measuring device 10 to be inspected, and the current value (voltage value) applied to the lighting unit 50 can be automatically adjusted to achieve a preset illumination. With this setting, the scale plate 200 of the measuring device 10 to be inspected is photographed as a test to obtain image data (ST1300). The acquired image data is recorded in the image data acquisition unit 420.

[0119] In the test image data, it is checked whether there is any pixel with a saturated brightness value (ST1400). When there is no pixel with a saturated brightness value (ST1400: No), the exposure time of the camera 40 is increased by one unit (ST1500). Taking into account the specifications of the camera 40, the inspection accuracy of the scale plate 200, and the time required for the inspection, one unit of the exposure time of the camera 40 is appropriately set in units of 1 / 1000 seconds, 1 / 100 seconds, or 1 / 10 seconds. Here, since the exposure of the camera 40 is set to the minimum, the brightness is not saturated from the beginning, and while the exposure time of the camera 40 is increased (ST1500), the image capture (ST1300) is repeated as a test until the initial pixel with a saturated brightness value appears (ST1400).

[0120] When the first pixel with a saturated brightness value appears (ST1400: YES), the exposure time is reduced by one unit from the exposure time at that point (ST1600). This means that the exposure time is now set to the maximum exposure time within the range where the pixel brightness in the image data is not saturated.

[0121] With this illumination and exposure time setting, it is checked whether the image data is higher than a predetermined standard brightness (ST1700). The brightness distribution (histogram) of the image data is calculated, and the number of pixels whose brightness (brightness value) is higher than a predetermined threshold is counted. When the count value exceeds the predetermined number, the brightness adjustment is assumed to be successful. When the number of pixels whose brightness (brightness value) is higher than the predetermined threshold is insufficient, the brightness of the illumination unit 50 is increased by one unit (the current value to be applied or the illumination intensity is increased) (ST1800), and the process returns to ST1200 to perform brightness adjustment again.

[0122] This brightness adjustment ensures that the brightness distribution of the image data is optimal every time and the posture detection is stable every time.

[0123] When the brightness adjustment (ST1000) is successful, the process returns to Figure 4 , and the scale plate 200 is photographed by the camera 40 (image sensor) to acquire image data (ST2000) and the image data is recorded in the image data acquisition unit 420 as image data for inspection.

[0124] Since the scale plate image data for inspection has been acquired, the relative posture between the scale plate 200 and the camera 40 is inspected based on the scale plate image data. For inspection, a comparison area extraction step ( Figure 6 ST3500 in the example to extract the first comparison area and the second comparison area to be compared in the image data. Fig.16 As shown, the first comparison area and the second comparison area are areas in the image data that are in a point-symmetrical relationship with the center of the scale plate 200 as the symmetry center, or areas that are located on opposite sides to each other in a state where a virtual straight line passing through the center of the scale plate 200 is between the first comparison area and the second comparison area. By comparing the pixel value (color and brightness) in the first comparison area with the pixel value in the second comparison area, the relative posture of the camera 40 and the scale plate 200 is checked.

[0125] Figure 6 This is a flowchart for explaining the process of extracting a comparison region (region calculation step ST3000).

[0126] In the calculation of the contrast area (area calculation step ST3000), the center of the scale plate 200 in the image data is first calculated (center calculation step ST3100). There are various methods for calculating the center of the scale plate 200. For example, by treating the scale plate 200 in the image data as a circle, the center of the circle can be calculated. In addition, the outer shape of the scale plate (circle) 200 can be extracted by image recognition to calculate the center of the circle from several points on the circumference. If the scale plate 200 is tilted relative to the camera 40, strictly speaking, the scale plate 200 is photographed as an ellipse, but this deformation is very slight, and the center can be calculated by treating the ellipse as a circle. Even if the scale plate 200 is regarded as an ellipse, the center can be calculated from the intersection of the major diameter and the minor diameter.

[0127] Here, considering that the scale of the scale plate 200 is one of the important elements in the subsequent scale plate defect detection and indication value error evaluation, Figure 7 The process in the flowchart in (center calculation step ST3100) calculates the center of the scale plate 200 based on the scale.

[0128] Fig.14 is a diagram showing an example of the center of the scale plate 200 , and is also referred to.

[0129] By detecting two scales parallel to the y-axis from the scale plate image data in two-dimensional Cartesian coordinates (x, y), the 0° scale and the 180° scale (ST3200) are found (see Fig.14 ). In addition, by detecting two scales parallel to the x-axis from the scale plate image data in two-dimensional Cartesian coordinates (x, y), the 90° scale and the 270° scale are found (ST3200). Then, the center coordinate of the 0° scale in the width direction is calculated, and the center coordinate of the 180° scale in the width direction is calculated (ST3300). Similarly, the center coordinate of the 90° scale in the width direction is calculated, and the center coordinate of the 270° scale in the width direction is calculated (ST3300).

[0130] Once the center coordinates of each scale in the width direction are calculated, the center coordinates of the 0° scale and the center coordinates of the 180° scale are connected to form a y1 line. Similarly, the center coordinates of the 90° scale and the center coordinates of the 270° scale are connected to form an x1 line. The intersection of the y1 line and the x1 line is set as the center of the scale plate 200 (ST3400).

[0131] However, since the scales each have a width, the coordinate value of the center of the width of each scale is used as the position of the scale (ST3300). At this time, when setting the center of the width of the scale at 0°, for example, the midpoint of the coordinate value of the left edge of the scale and the coordinate value of the right edge of the scale is used. In order to prevent the midpoint coordinate from shifting to the left or right within the scale width, the same process and the same threshold are used to search for the left edge and the right edge.

[0132] Figure 8 and Fig. 9 1 is a flowchart for explaining the process of calculating the center coordinate value of the scale in the width direction. Here, the case of calculating the center coordinate value of the 0° scale in the width direction is described as an example. Fig.15 is an enlarged view of the scale and is also referenced. The same process can be applied to the case of calculating the center of the width of the scale at 180°. In addition, by changing the orientation (interchanging the x-axis with the y-axis), the same process can also be applied to the case of calculating the center of the width of the scale at 90° and 270°, respectively.

[0133] In ST3311, a line parallel to the X-axis is extracted from the area of ​​the 0° scale. The scale (or the scale with a larger Y coordinate value) that is parallel to the Y-axis and located on the positive side of the Y-axis is identified as the 0° scale. For example, since the background is white and the scale is black, the area of ​​pixels with a brightness less than half (128) of the maximum brightness (255) can be set as the scale area. Alternatively, the area of ​​pixels with a brightness less than 0.7 (179) of the maximum brightness (255) can be set as the scale area, or the area of ​​pixels with a brightness less than 0.65 (166) can be set as the scale area. Here, the scale area includes both the scale itself and the background around the scale. In other words, the scale area is defined as an area where the scale cross-section line described later can cross from the background to the scale and then to the background.

[0134] Then, in order to calculate the center coordinate value of the scale width (here, the width in the X direction), a line that crosses the scale area in a direction orthogonal to the scale parallel to the Y direction (the direction is parallel to the X direction) is extracted. This line is called the scale cross-section line. Fig.15 In the figure, for the sake of clarity, the scale lines are shown as long lines.

[0135] It is only required that the scale cross-section line must cross the scale, and there is no particular restriction on where the line crosses the scale (which line is extracted). Here, as an example, a line that crosses the middle of the scale area in the Y direction (the middle of the scale in the vertical direction) is extracted.

[0136] For the scale lines extracted in this way, the same algorithm with different orientations is used to search for the left edge coordinates (the edge coordinates in the direction of the small X coordinate value) and the right edge coordinates (the edge coordinates in the direction of the large X coordinate value). Figure 8 Search for the left edge coordinates (edge ​​coordinates in the direction with smaller X coordinate values) in ST3312 to ST3320.

[0137] In ST3312, the pixel with the minimum X coordinate value in the scale horizontal line is set as the focus pixel, and the brightness value of the focus pixel is obtained. The obtained brightness value is represented as L0.

[0138] In ST3313, the stable count N is reset to 0 (zero). The stable count N will be described later.

[0139] In ST3314, the pixel of interest is moved one pixel to the positive side in the X direction (the adjacent pixel on the positive side), and the brightness value of the new pixel of interest is obtained, where the brightness value is represented as L(k) using the index number k. Here, the new pixel of interest is represented as L1. In ST3315, the brightness difference L(k)-L(k-1) between two adjacent pixels in the X direction is calculated, specifically L1-L0, and the size of the brightness difference |L1-L0| is compared with the preset stability judgment threshold to determine whether the brightness difference |L1-L0|≤stability judgment threshold is satisfied. If the brightness difference |L1-L0|≤stability judgment threshold is satisfied, it is inferred that the pixel of interest is not on the transition boundary between the background and the scale, but on the scale or inside the scale. When the brightness difference |L1-L0|≤stability judgment threshold is satisfied, the stability count N is increased by 1 (N=N+1) (ST3317). Before the stable count N reaches a preset stable count threshold value (for example, 5) (ST3318), while the pixel of interest moves in the positive direction of the X direction (ST3319, ST3314), ST3314 to ST3318 are repeated. When the brightness difference L(k)-L(k-1) of the adjacent pixels is continuously stable and the number of stable counts N reaches the stable count threshold value (for example, 5), the coordinate value of the pixel of interest at this time (here, the X coordinate value) is stored as the left edge coordinate ELmin.

[0140] If the luminance difference |L1-L0|≤stable judgment threshold is not satisfied (ST3315: No), it is inferred that the focus pixel is on the transition boundary between the background and the scale, but not on the scale, so the stable count is reset to zero (ST3313) and the search is continued.

[0141] exist Fig. 9 Among them, ST3321 to ST3329 are processes for searching for right edge coordinates (edge ​​coordinates in a direction with a large X coordinate value).

[0142] and Figure 8 The difference between ST3312 and ST3320 in the above is that the search is performed from right to left (from a larger X coordinate value to a smaller X coordinate value). First, in ST3312, the pixel with the largest X coordinate value in the scale horizontal line is set as the focus pixel, and the brightness value L0 of the focus pixel is obtained (ST3321). Then, in ST3323, the brightness value L(j) of the adjacent pixel on the negative side is obtained. When searching for the right edge coordinate ( Fig. 9 In the flowchart in FIG. 1 , the index number j is used. In other processes, both the stable judgment threshold and the stable counting threshold are the same as Figure 8 The same algorithm with a different orientation is used to search for the right edge coordinate, and the searched right edge coordinate is stored as the right edge coordinate ELmax (ST3329).

[0143] The center coordinate value CLx of the scale is the midpoint between the left edge coordinate ELmin and the right edge coordinate ELmax, that is, (Elmin+ELmax) / 2 (ST3330).

[0144] In this way, by searching for edges from both the left and right sides using the same process, any deviation in midpoint detection within the scale width is eliminated.

[0145] Alternatively, two or more scale cross-section lines may be extracted, and the center coordinate values ​​of these lines in the width direction may be calculated to determine the average value.

[0146] At this point, the center of the scale plate 200 has been calculated (ST3100), and the process returns to Figure 6 3. The flowchart in (region calculation step ST3000) describes the comparison region extraction step (ST3500).

[0147] Fig.10 It is a flowchart for explaining the process of the comparison area extraction step (ST3500). Fig.16 is a diagram showing an example of a first contrast area and a second contrast area, and is also referenced. In ST3510, the center coordinate value of the scale plate 200 previously calculated is read. Then, an area of ​​a predetermined size containing a scale located on the negative side of the X direction relative to the center is extracted (ST3520). (The area is searched to the negative side along a line parallel to the X-axis and passing through the center to find a 270° scale). The area is set as the first contrast area (ST3530). Here, the area including the scale at 270° is the first contrast area. As the contrast area, an area assumed to contain both the scale and the background is extracted.

[0148] Next, an area of ​​a predetermined size is extracted at a position symmetrical to the first contrast area (ST3540). This area is set as a second contrast area (ST3550). Here, it is assumed that the first contrast area and the second contrast area are point-symmetrical with respect to the center, but they may also be line-symmetrical with respect to a virtual line parallel to the Y axis and passing through the center.

[0149] Check whether the first contrast area and the second contrast area each contain the background and the scale (ST3560). Since the scale plate 200 is circular, the positions of the two scales are symmetrical with respect to the center, and the first contrast area and the second contrast area each contain the scale and the background, as long as the second contrast area is extracted symmetrically with respect to the first contrast area. If at least one of the first contrast area and the second contrast area does not contain both the scale and the background (ST3560: No), the extraction is retried by expanding the extraction area range (ST3570). If the first contrast area and the second contrast area are not successfully extracted after a predetermined number of retries, an error notification is made and the process is suspended.

[0150] After extracting the first and second comparison areas, return to Figure 4 According to the flowchart in (scale plate posture inspection method), a comparison processing step (ST4000) is performed to compare the first comparison area and the second comparison area based on brightness. Fig.11 4 is a flowchart showing the process of the contrast processing step (ST4000). The contrast processing step (ST4000) includes: a filtering processing step (ST4100) for performing filtering processing (differential filtering in this case) on the first contrast area and the second contrast area to obtain the brightness difference in each contrast area; and a tilt determination step (ST4200) for comparing the brightness difference data obtained in the filtering processing step (ST4100) to evaluate the tilt of the scale plate 200.

[0151] Fig.12 4 is a flowchart for explaining the process of the filtering process step. The filtering process step ST4100 includes a first contrast brightness difference calculation step (ST4110) for filtering the first contrast area to obtain a first contrast brightness difference, and a second contrast brightness difference calculation step (ST4120) for filtering the second contrast area to obtain a second contrast brightness difference. The first contrast brightness difference calculation step (ST4110) and the second contrast brightness difference calculation step (ST4120) have different calculation objects, but the processing contents are the same.

[0152] In the first contrast brightness difference calculation step (ST4110), the maximum value of the brightness difference of each adjacent pixel in each line of the first contrast area is first calculated (ST4111). Here, since the first contrast area is an area including a 270° scale, and the 270° scale is parallel to the X-axis, the line that vertically cuts the scale along the X direction is called a scale vertical cutting line. Fig.16 A one-dimensional differential filter is applied to each scale vertical line, for example, the pixel value (brightness value) of each pixel is multiplied by (1, -1) along the X direction to calculate the brightness difference between the pixel of interest and its neighboring pixels. Fig.17 is a diagram schematically showing the change in brightness difference when a one-dimensional differential filter is applied along a scale vertical line, and is also referred to. For example, when the brightness value of the pixel of interest is L1 and the brightness value of its adjacent pixel is L2, the brightness difference DL is |L1-L2|. Ultimately, it is sufficient to compare the "size" of the brightness difference obtained in the first contrast area with the "size" of the brightness difference obtained in the second contrast area, and the brightness difference here is considered to be the size (absolute value) of the brightness difference. For each line (each scale vertical line), the maximum value DLmax of the brightness difference is calculated.

[0153] When calculating the maximum value DLmax of the luminance difference in the first contrast luminance difference calculation step (ST4110), only one line (vertical line of the scale) can be used for the calculation, but it is desirable to calculate the maximum value DLmax of the luminance difference for each of a plurality of lines (vertical lines of the scale). Then, in ST4112, the average value of the plurality of maximum values ​​DLmax of the calculated luminance difference is calculated to be used as the first contrast luminance difference DL1 (ST4112).

[0154] For the second contrast area (in this case, the area containing the 90° scale), the maximum value DLmax of the brightness differences of each adjacent pixel in each line is also calculated (ST4121), and the average value of the maximum values ​​DLmax is calculated to be used as the second contrast brightness difference DL2 (ST4122).

[0155] Since the first contrast luminance difference DL1 in the first contrast region and the second contrast luminance difference DL2 in the second contrast region are calculated in the filtering process step ST4100, the filter returns to Fig.11 4. The flowchart in FIG. 4 (comparison processing step ST4000) is followed by the tilt determination step (ST4200). Fig.13As shown in the flowchart in, first, the difference between the first contrast brightness difference DL1 in the first contrast area and the second contrast brightness difference DL2 in the second contrast area is calculated to be used as the brightness difference difference ΔDL (= DL1-DL2) (ST4210). When the size of the brightness difference difference ΔDL |ΔDL| is less than or equal to the preset tilt judgment threshold value (ST4220: Yes), it means that the left and right sides of the scale plate 200 are similarly photographed and the scale plate 200 is not tilted (or tilted within an acceptable range) (ST4230).

[0156] On the other hand, when the difference between the first contrast brightness difference DL1 and the second contrast brightness difference DL2 is large (ST4220: No), it is determined that the scale plate 200 is tilted relative to the optical axis of the camera 40. The larger the difference between the first contrast brightness difference DL1 and the second contrast brightness difference DL2, the greater the difference means that there is a difference in sharpness between the left and right scales in the image data. Because the camera 40 is focused on the scale plate 200, it means that the scale plate 200 is focused within the depth of field, but there is a difference in sharpness between the left and right scales in detail. Although this difference may be small, when the scale defect inspection and the indication value error inspection are subsequently performed based on the image data, this causes a difference in the detection of the scale and the pointer on the left and right sides in the image data.

[0157] When the magnitude of the difference ΔDL of the luminance difference |ΔDL| exceeds the tilt determination threshold, the first contrast luminance difference DL1 and the second contrast luminance difference DL2 are stored. The first contrast luminance difference DL1 and the second contrast luminance difference DL2 may be compared to store which is larger (or which is smaller).

[0158] Furthermore, in ST4250, the magnitude of the difference ΔDL of the brightness difference (= DL1-DL2) is converted into the tilt amount. This can be tabulated by calculating in advance through preliminary experiments the relationship between the magnitude of the tilt angle of the scale plate 200 with respect to the camera optical axis and the magnitude of the difference ΔDL of the brightness difference. Alternatively, an evaluation index that classifies the difference ΔDL of the brightness difference into, for example, 10 levels according to the magnitude may be used instead of strictly converting the difference ΔDL of the brightness difference into the tilt angle at intervals of 0.1°.

[0159] Next, the guidance display step (ST5000) is described.

[0160] In the guidance display step ( ST5000 ), the inclination (or inclination level) of the scale plate 200 is visualized and displayed on a display device (monitor) to provide the operator with auxiliary information for adjusting the posture of the scale plate 200 . Fig.18 and Fig.19 An example of a guide display is shown. Fig.18 and Fig.19In the example of FIG. 2 , the scale plate 200 is displayed on the monitor screen, and the balance of the tilt of the scale plate 200 is indicated by the length of the bar with color (e.g., blue and yellow) below the scale plate 200. When the scale plate 200 is not tilted, as shown in FIG. Fig.19 As shown, the left (yellow) bar and the right (blue) bar have the same length. When the scale plate 200 has an inclination, the lengths of the left and right bars change to indicate the magnitude of the inclination. Here, the bar on the side with the smaller brightness difference (the first contrast brightness difference DL1 or the second contrast brightness difference DL2) is indicated to be longer. The operator refers to the guide display, adjusts the posture of the scale plate 200, and repeats the scale plate posture check several times to make the scale plate 200 have an inclination. Fig.19 This allows the measuring device 10 to be installed in a manner that the scale plate 200 directly faces the camera 40, and allows the operator to confirm that the scale plate 200 and the camera 40 are directly facing each other.

[0161] By simply visually observing the measuring device 10 (scale plate 200) or by visually observing the image data obtained by photographing the measuring device 10 (scale plate 200) on the screen, it is impossible to strictly judge whether the scale plate 200 and the camera 40 are facing each other. Therefore, the scale plate 200 cannot be installed in a manner that the scale plate 200 and the camera 40 are strictly facing each other. For this reason, even the measuring device 10 that originally passed the inspection failed to pass the inspection of the defects in the scale plate 200 or the accuracy of the measuring device 10, and this caused problems such as time and cost for investigating the cause of the problem and replacing parts, which were originally unnecessary. In this regard, the inventors have carefully examined the reasons why the inspection of the defects in the scale plate 200 or the accuracy of the measuring device 10 often cannot be successfully performed, and after their careful study, they have recognized that the root of the problem is the installation posture of the measuring device 10 (scale plate 200) and the camera 40. Therefore, the present invention strictly checks the relative posture between the camera 40 and the scale plate 200 by focusing on the pixel value or the difference in pixel value (the difference in pixel value of adjacent pixels) in the comparison areas (the first comparison area and the second comparison area) at symmetrical positions.

[0162] The present invention is not limited to the above-described exemplary embodiments, and can be appropriately modified without departing from the gist.

[0163] The scale plate 200 may be an analog scale plate (analog dial) having scales engraved or printed on an actual plate, or a scale plate displayed on a digital display panel such as an LCD or OLED panel.

[0164] In the above exemplary embodiments, scales that are point-symmetric with respect to the center of scale plate 200 or symmetric with respect to a virtual line passing through the center are used for comparison, but marks (e.g., numbers or symbols, etc.) at symmetrical positions may be used instead of scales.

[0165] Although a one-dimensional differential filter is used in the above description, the processing is not limited to this as long as it can emphasize the pixel value (brightness value) of the boundary between the background of the scale plate and the mark on the scale plate (for example, a mark such as scales, etc.).

[0166] In the above-described exemplary embodiments, brightness values ​​are used as pixel values, but color shades (black and white tones or RGB tones) may be used for contrast.

[0167] CROSS-REFERENCE TO RELATED APPLICATIONS

[0168] This application is based upon and claims the benefit of priority from Japanese patent application No. 2023-108962 (DAS code E4C0) filed on June 30, 2023, the disclosure of which is incorporated herein by reference in its entirety.

Claims

1. A scale plate posture verification method for verifying the relative posture between a camera and a scale plate, the scale plate posture verification method comprising: An image data acquisition step for acquiring image data related to the scale plate from the camera; A region calculation step, for extracting a first contrast region and a second contrast region from the image data; as well as a contrast processing step for comparing the first contrast area with the second contrast area based on brightness or color, The relative posture between the camera and the scale plate is checked based on the comparison result in the comparison processing step.

2. The scale plate posture inspection method according to claim 1, wherein: The first contrast region and the second contrast region are located on opposite sides to each other at the center of the scale plate or in a state where a virtual straight line passing through the center of the scale plate is between the first contrast region and the second contrast region.

3. The scale plate posture inspection method according to claim 1, wherein: The first contrasting area and the second contrasting area each include a background color portion of the scale plate and a printed or engraved mark.

4. The scale plate posture inspection method according to claim 1, wherein: The comparison processing step includes calculating the difference between pixel values ​​or brightness values ​​of adjacent pixels in each of the first comparison area and the second comparison area to compare the size of the difference in the first comparison area with the size of the difference in the second comparison area.

5. The scale plate posture inspection method according to claim 1, before performing the area calculation step, further comprising: A brightness adjustment step for adjusting illumination and camera exposure so that the exposure time of the camera is longest within a range where the brightness of pixels in the image data is not saturated, and the number of pixels having a brightness higher than a predetermined threshold is a predetermined fixed count value or more.

6. The scale plate posture inspection method according to claim 1, wherein: The area calculation step comprises: a center calculation step for calculating the center of the scale plate, and The center calculation step includes: calculating a line connecting a first pair of scale marks at point-symmetric positions with respect to a center of the scale plate and a line connecting a second pair of scale marks at point-symmetric positions with respect to a center of the scale plate; and An intersection point of a line connecting the first scale pair and a line connecting the second scale pair is set as the center of the scale plate.

7. The scale plate posture inspection method according to claim 6, wherein: The center calculation step includes: searching edge coordinates on one side from one side of each scale in the width direction using a predetermined algorithm, and searching edge coordinates on the other side from the other side of the scale in the width direction using the same algorithm having a different orientation from the predetermined algorithm; and A line for connecting each scale pair is calculated by setting a midpoint between the edge coordinates of the one side and the edge coordinates of the other side as the center coordinate of the width of each scale and connecting the center coordinates of each scale pair.

8. A computer-readable recording medium storing a scale plate posture checking program, wherein the scale plate posture checking program causes a computer to execute: An image data acquisition step for acquiring image data related to the scale plate from a camera; an area calculation step for extracting a first contrast area and a second contrast area from the image data; and a contrast processing step for comparing the first contrast area with the second contrast area based on brightness or color, in, The relative posture between the camera and the scale plate is checked based on the comparison result in the comparison processing step.

9. A scale plate posture verification device, configured to verify the relative posture between a camera and a scale plate, the scale plate posture verification device comprising: an image data acquisition unit configured to acquire image data related to the graticule from the camera; A region calculation unit configured to extract a first comparison region and a second comparison region from the image data; as well as a contrast processing unit configured to compare the first contrast area with the second contrast area based on brightness or color, The relative posture between the camera and the scale plate is checked based on the comparison result of the comparison processing unit.

10. The scale plate posture inspection device according to claim 9, wherein: providing a base plate extending from a bracket portion, the bracket portion being configured to hold a measuring device to be inspected including a scale plate to be inspected, and The camera is mounted on the base plate.

11. The scale plate posture inspection device according to claim 10, wherein: The bracket portion is mounted on the standard gauge so that the relative positions and postures of the measuring device to be inspected, the standard gauge, and the camera can be fixed.

12. A computer program product comprising a scale plate posture verification program, wherein the scale plate posture verification program causes a computer to execute: An image data acquisition step for acquiring image data related to the scale plate from a camera; an area calculation step for extracting a first contrast area and a second contrast area from the image data; and a contrast processing step for comparing the first contrast area with the second contrast area based on brightness or color, in, The relative posture between the camera and the scale plate is checked based on the comparison result in the comparison processing step.