Image encoding device, image processing system, and component mounting machine
The image encoding device enhances DPCM by encoding consecutive pixel differences in sets to improve compression efficiency, addressing the challenge of high-resolution image data volume without quality loss, facilitating high-speed data transfer in devices like component mounting machines.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- FUJI CORP
- Filing Date
- 2022-09-05
- Publication Date
- 2026-06-03
AI Technical Summary
Existing image compression methods, such as differential pulse code modulation (DPCM), struggle to maintain high compression rates as image resolution increases without degrading image quality.
An image encoding device that encodes the difference between pixel grayscale data using DPCM, grouping consecutive difference values into predetermined sets to encode multiple values into a fixed number of bits, optimizing compression without degrading image quality.
Improves image compression ratio by reducing data volume while maintaining image quality, enabling high-speed data transfer and efficient processing in devices like component mounting machines.
Smart Images

Figure 0007869864000001 
Figure 0007869864000002 
Figure 0007869864000003
Abstract
Description
Technical Field
[0001] This specification discloses an image encoding device, an image processing system, and a component mounting machine.
Background Art
[0002] Conventionally, as a data compression method, differential pulse code modulation (DPCM; Differential Pulse Code Modulation) that encodes the difference between the gradation value of a pixel and its predicted value is known. For example, in Patent Document 1, in a method of encoding and compressing continuous image signals read from a reading object according to the gradation of the image, when the absolute value of the difference between the gradation data of a pixel and the gradation data of the previous pixel is less than or equal to a certain value, the difference is encoded, and when it is greater than the certain value, the absolute value of the gradation data is encoded. According to this method, when the difference in gradation between pixels is small, a simple small number of codes are sufficient, and when the difference is large, it is possible to prevent the continuous occurrence of error codes by indicating the absolute value of the density of the pixel by a code.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Summary of the Invention
Problems to be Solved by the Invention
[0004] By encoding an image by DPCM, the image can be compressed at a high compression rate. However, in recent years, imaging devices have been becoming higher in resolution and the amount of image data has been increasing more and more. Therefore, it is desired to further improve the compression rate of an image without degrading the image quality.
[0005] ] The main object of the present disclosure is to further improve the compression rate of an image without degrading the image quality. [Means for solving the problem]
[0006] This disclosure employs the following means to achieve the primary objectives described above.
[0007] The image encoding device disclosed herein, An image encoding device that encodes an image using differential pulse code modulation, which encodes the difference between the grayscale data of one pixel and the grayscale data of the previous pixel, When a plurality of consecutive difference values are a predetermined set of specific values, the plurality of difference values are encoded into data of a predetermined number of bits. This is the gist of it.
[0008] The image encoding device disclosed herein can improve the image compression ratio without degrading image quality.
[0009] The image processing system disclosed herein can achieve the same effects as the image encoding device disclosed herein. Furthermore, the component mounting machine disclosed herein, since it is equipped with the image processing system disclosed herein, can achieve the same effects. [Brief explanation of the drawing]
[0010] [Figure 1] This is a schematic diagram of the component mounting machine. [Figure 2] This block diagram shows the electrical connection relationship between the mounting head and the mounting control device. [Figure 3] This is a flowchart showing an example of image encoding processing. [Figure 4] This is a flowchart showing an example of image encoding processing. [Figure 5] This is a flowchart showing an example of image encoding processing. [Figure 6] This is an explanatory diagram showing an example of an encoding table. [Figure 7] This is an explanatory diagram showing an example of an image. [Figure 8]This is an explanatory diagram showing the number of pixels (pixel counter) for each difference value when the image in Figure 7 is encoded using DPCM. [Figure 9] This diagram illustrates the number of conversion values (conversion counters) for each of the 1-3 symbols converted when the image in Figure 7 is encoded using DPCM, as well as the number of conversion values for each of the consecutive difference values. [Figure 10A] Figure 7 is an explanatory diagram showing the number of pixels (pixel counter) and the total number of bits in the image. [Figure 10B] This diagram illustrates the number of converted values (conversion counters) and the total number of bits when the image in Figure 7 is encoded one difference value at a time. [Figure 10C] This diagram illustrates the number of conversion values (conversion counter), the number of pixels (pixel counter), and the total number of bits when the image in Figure 7 is encoded using the DPCM method of this disclosure. [Figure 11] This block diagram shows the electrical connection relationship between the mounting head and the mounting control device according to another embodiment. [Figure 12] This is a flowchart illustrating an example of image processing. [Modes for carrying out the invention]
[0011] Next, embodiments for implementing this disclosure will be described with reference to the drawings. Figure 1 is a schematic diagram of the component mounting machine 10. Figure 2 is a block diagram showing the electrical connection relationship between the mounting head 40 and the mounting control device 60. As shown in Figure 1, the component mounting machine 10 includes a base 11, a component supply device 21, a substrate transport device 22, a head moving device 30, a mounting head 40, and a mounting control device 60 (see Figure 2). In addition to these, the component mounting machine 10 also includes a parts camera 26 and a mark camera 28.
[0012] The parts supply device 21 is installed at the front of the base 11. The parts supply device 21 is, for example, a tape feeder that supplies parts by feeding out the tape from the reel, and includes a reel around which cavities are formed at predetermined intervals and in which a tape containing parts is wound.
[0013] The substrate transfer device 22 has a pair of conveyor belts provided at an interval in the front-rear direction (Y-axis direction) of FIG. 1 with respect to the base 11 and spanning in the left-right direction (X-axis direction). The substrate S is transferred from left to right in the drawing by the conveyor belts of the substrate transfer device 22.
[0014] The head movement device 30 moves the mounting head 40 in the front-rear, left-right (XY-axis directions). As shown in FIG. 1, this head movement device 30 includes an X-axis slider 32 and a Y-axis slider 34. The X-axis slider 32 is supported by a pair of X-axis guide rails provided to extend in the left-right direction on the front surface of the Y-axis slider 34 and is movable left and right by the drive of an X-axis motor (servo motor) 36 (see FIG. 2). The Y-axis slider 34 is supported by a pair of Y-axis guide rails provided to extend in the front-rear direction on the upper stage portion of a housing not shown and is movable back and forth by the drive of a Y-axis motor (servo motor) 38 (see FIG. 2). Incidentally, the left and right positions of the X-axis slider 32 are detected by an X-axis encoder 37 (see FIG. 2), and the front and back positions of the Y-axis slider 34 are detected by a Y-axis encoder 39 (see FIG. 2). The mounting head 40 is attached to the X-axis slider 32. Therefore, the mounting head 40 can be moved back and forth and left and right along the XY plane (horizontal plane) by driving and controlling the head movement device 30 (X-axis motor 36 and Y-axis motor 38). Further, the X-axis slider 32 also includes a mark camera 28 for imaging and reading the reference mark attached to the substrate S from above. Incidentally, the mark camera 28 is electrically connected to a circuit board not shown installed on the X-axis slider 32 and is connected to the mounting control device 60 via the circuit board.
[0015] In this embodiment, the mounting head 40 is a rotary head including a plurality of nozzle holders (not shown) arranged at equal angular intervals in the circumferential direction. An adsorption nozzle 41 is detachably attached to the tip of each nozzle holder. Although not shown, a suction port communicating with a negative pressure source via a solenoid valve is provided at the tip of the adsorption nozzle 41. The adsorption nozzle 41 adsorbs the component P by the negative pressure from the negative pressure source supplied with the solenoid valve open.
[0016] The mounting head 40 includes an R-axis motor (servo motor) 42 that rotates (revolves) each nozzle holder (adsorption nozzle 41) in the circumferential direction, a θ-axis motor (servo motor) 43 that rotates (rotates) each nozzle holder, and a Z-axis motor (servo motor) 44 that raises and lowers (moves up and down) the nozzle holder at a predetermined turning position among each nozzle holder. Further, the mounting head 40 includes an R-axis encoder 45 for detecting the turning position of each nozzle holder, a θ-axis encoder 46 for detecting the rotational position of each nozzle holder, and a Z-axis encoder for detecting the raising and lowering position of the nozzle holder at a predetermined position.
[0017] Furthermore, the mounting head 40 also includes a side camera 48 for imaging the tip of the adsorption nozzle 41 from the side, a light source unit 49 for illuminating the subject (component P adsorbed by the adsorption nozzle 41) of the side camera 48, an image encoding unit 50 for encoding the image captured by the side camera 48, and an optical communication unit 51 for communicating with the mounting control device 60.
[0018] The optical communication unit 51 is connected to the optical communication unit 67 of the mounting control device 60 via an optical fiber cable 55. The mounting head 40 exchanges various signals with the mounting control device 60 via optical communication. The various signals transmitted to the mounting control device 60 include position signals from each axis encoder (R-axis encoder 45, θ-axis encoder 46, and Z-axis encoder 47) and image signals captured by the side camera 48 and encoded by the image encoding unit 50. In addition, the various signals received from the mounting control device 60 include control signals to each axis motor (R-axis motor 42, θ-axis motor 43, and Z-axis motor 44), control signals to the side camera 48, and control signals to the light source unit 49.
[0019] The image encoding unit 50 encodes the image captured by the side camera 48 using differential pulse code modulation (DCPM) in order to reduce communication data. Details of DCPM will be described later. The encoded image signal is transmitted to the mounting control device 60 via the optical communication unit 51 and the optical fiber cable 55.
[0020] The mounting control device 60 is mounted on the base 11 and, as shown in Figure 2, comprises a CPU 61, a storage unit 62, a servo amplifier 63, an image decoding unit 64, an image processing unit 65, an input / output interface 66, and an optical communication unit 67. The CPU 61, storage unit 62, servo amplifier 63, image decoding unit 64, and image processing unit 65 are electrically connected. Furthermore, the CPU 61, storage unit 62, servo amplifier 63, image decoding unit 64, and image processing unit 65 are electrically connected to the input / output interface 66 and also to the optical communication unit 67. The storage unit 62 includes RAM for temporarily storing data, and an SSD or HDD for storing processing programs and various data. The input / output interface 66 is electrically connected to the component supply device 21, the substrate transport device 22, and the head movement device 30, specifically to the encoders (X-axis encoder 37, Y-axis encoder 39) and motors (X-axis motor 36, Y-axis motor 38) of each axis. Furthermore, the input / output interface 66 is electrically connected to the parts camera 26, the light source unit 27 for illuminating the subject of the parts camera 26, the display device 25 for displaying various information, the mark camera 28, and the light source unit 29 for illuminating the subject of the mark camera 28.
[0021] The servo amplifier 63 provides feedback control for each axis motor (servo motor). The servo amplifier 63 receives position signals from each axis encoder (X-axis encoder 37 and Y-axis encoder 39) of the head movement device 30 via the input / output interface 66, generates control signals for each axis motor (X-axis motor 36 and Y-axis motor 38) of the head movement device 30 based on the input position signals, and outputs these control signals to the corresponding axis motors via the input / output interface 66. In addition, the servo amplifier 63 receives position signals from each axis encoder (R-axis encoder 45, θ-axis encoder 46 and Z-axis encoder 47) of the mounted head 40 via the optical communication unit 67, generates control signals for the corresponding axis motors (R-axis motor 42, θ-axis motor 43 and Z-axis motor 44) of the mounted head 40 based on the input position signals, and outputs these control signals to the corresponding axis motors via the optical communication unit 67.
[0022] The image decoding unit 64 decodes images captured by the side camera 48 and encoded by the image encoding unit 50 using a decoding table. The image processing unit 65 processes image signals captured by various cameras (parts camera 26, mark camera 28, and side camera 48). The image processing unit 65 receives image signals from the parts camera 26 and mark camera 28 via the input / output interface 66, as well as image signals decoded by the image decoding unit 64.
[0023] Next, the operation of the component mounting machine 10 of the embodiment configured in this way will be described. First, the CPU 61 of the mounting control device 60 controls the head moving device 30 so that the mark camera 28 moves above the reference marks attached to the substrate S after the substrate transport device 22 has loaded and positioned the substrate S. This control is performed by the servo amplifier 63 receiving position signals from the X-axis encoder 37 and Y-axis encoder 39 via the input / output interface 66 based on a control command from the CPU 61, and generating a control signal based on the input position signal, which is then output to the X-axis motor 36 and Y-axis motor 38 via the input / output interface 66. Subsequently, the CPU 61 controls the mark camera 28 and its light source unit 29 so that the reference marks are imaged. This image control is performed by the CPU 61 transmitting control signals to the mark camera 28 and the light source unit 29. As a result, the reference marks on the substrate S are imaged by the mark camera 28. The image signal from the mark camera 28 is output to the image processing unit 65. The image processing unit 65 performs image processing to recognize the reference marks in the image based on the input image signal. Then, the CPU 61 recognizes the position of the substrate S based on the image processing results of the image processing unit 65.
[0024] Next, the CPU 61 performs a suction operation to pick up the component P with the suction nozzle 41. That is, the CPU 61 controls the head moving device 30 so that the suction nozzle 41 moves above the component P supplied by the component supply device 21. The control of the head moving device 30 is described above. Subsequently, the CPU 61 controls the Z-axis motor 44 so that the suction nozzle 41 descends and supplies negative pressure to the suction port of the suction nozzle 41. As a result, the component P is picked up by the suction nozzle 41. The control of the Z-axis motor 44 is performed by the servo amplifier 63 receiving a position signal from the Z-axis encoder 47 based on a control command from the CPU 61, and sequentially inputting it through the optical communication unit 51 of the mounting head 40, the optical fiber cable 55, and the optical communication unit 67 of the mounting control device 60, and outputting a control signal generated based on the input position signal to the Z-axis motor 44 sequentially through the optical communication unit 67 of the mounting control device 60, the optical fiber cable 55, and the optical communication unit 51 of the mounting head 40. Furthermore, if the CPU 61 has not picked up the predetermined number of parts P from the multiple suction nozzles 41 of the mounting head 40, it controls the R-axis motor 42 so that the suction nozzles 41 (nozzle holders) rotate by a predetermined amount until the predetermined number of parts P are picked up, and repeats the process of picking up parts P from the next suction nozzle 41 to be picked up. The control of the R-axis motor 42 is performed by the servo amplifier 63 receiving a position signal from the R-axis encoder 45 based on a control command from the CPU 61, sequentially through the optical communication unit 51 of the mounting head 40, the optical fiber cable 55, and the optical communication unit 67 of the mounting control device 60, and then outputting a control signal generated based on the input position signal to the R-axis motor 42 sequentially through the optical communication unit 67 of the mounting control device 60, the optical fiber cable 55, and the optical communication unit 51 of the mounting head 40.
[0025] Each time the suction operation is performed, the CPU 61 controls the side camera 48 and the light source unit 49 so that the tip of the suction nozzle 41 is imaged from the side. This image control is performed by the CPU 61 transmitting control signals to the side camera 48 and the light source unit 49 via the optical communication unit 67 of the mounting control device 60, the optical fiber cable 55, and the optical communication unit 51 of the mounting head 40 in sequence. The image signal from the side camera 48 is encoded by the image encoding unit 50. The encoded image signal is output to the image decoding unit 64 via the optical communication unit 51 of the mounting head 40, the optical fiber cable 55, and the optical communication unit 67 of the mounting control device 60 in sequence. After being decoded by the image decoding unit 64, the image is output to the image processing unit 65. When the image processing unit 65 receives the image signal decoded by the image decoding unit 64, it performs image processing to recognize the component P (side of the component) in the image. The CPU 61 determines the suction state of the component P to the suction nozzle 41 (for example, whether there are any suction errors or whether the suction posture is good or bad) based on the image processing results of the image processing unit 65.
[0026] Once the CPU 61 has completed the suction of components P to all suction nozzles 41, it performs a mounting operation to mount the suctioned components P onto the substrate S. Specifically, the CPU 61 controls the head movement device 30 so that the mounting head 40 moves above the parts camera 26. Next, the CPU 61 controls the parts camera 26 and the light source unit 27 so that the components P suctioned onto the suction nozzles 41 are imaged. This image control is performed by the CPU 61 sending control signals to the parts camera 26 and the light source unit 27 via the input / output interface 66. The image signal from the parts camera 26 is output to the image processing unit 65 via the input / output interface 66. The image processing unit 65 performs image processing to recognize the components P (bottom surface of the components) in the image based on the input image signal. Based on the processing results of the image processing unit 65, the CPU 61 calculates the amount of positional displacement (suction displacement) of the components P suctioned onto each suction nozzle 41, and corrects the mounting position and mounting angle of the substrate S based on the calculated positional displacement. The CPU 61 corrects the mounting position and mounting angle, and then controls the head movement device 30 so that the component P, which has been picked up by the suction nozzle 41, moves upward to the corrected mounting position. The CPU 61 then controls the θ-axis motor 43 and Z-axis motor 44 so that the suction nozzle 41 descends when the component P reaches the corrected mounting angle, and also releases the supply of negative pressure to the suction port of the suction nozzle 41. The control of the θ-axis motor 43 is performed by the servo amplifier 63 receiving a position signal from the θ-axis encoder 46 via the optical communication unit 51, optical fiber cable 55, and optical communication unit 67 of the mounting head 40 in order, based on a control command from the CPU 61, and then outputting a control signal generated based on the input position signal to the θ-axis motor 43 via the optical communication unit 67, optical fiber cable 55, and optical communication unit 51 of the mounting head 40 in order. The control of the Z-axis motor 44 is as described above. As a result, the component P is mounted on the substrate S at the correct mounting position and mounting angle. If any unmounted component P remains on any of the multiple suction nozzles 41 of the mounting head 40, the CPU 61 repeats the process of mounting the component P currently held by the suction nozzle 41 to be mounted until all component P has been mounted.
[0027] Each time a mounting operation is performed, the CPU 61 controls the side camera 48 and the light source unit 49 so that the tip of the suction nozzle 41 is imaged from the side. The control of the side camera 48 and the light source unit 49 is described above. The image signal from the side camera 48 is encoded by the image encoding unit 50 as described above, then transmitted to the mounting control device 60 by optical communication, decoded by the image decoding unit 64, and output to the image processing unit 65. The image processing unit 65 performs image processing to recognize the component P (component side) in the image based on the input image signal. Then, based on the result of the image processing by the image processing unit 65, the CPU 61 determines whether or not there is a return error in which the suction nozzle 41 takes back the component P without mounting it on the substrate S.
[0028] As described above, the mounting control device 60 acquires images of the component P captured by the side camera 48 provided on the mounting head 40 via optical communication during the component picking and mounting operations. Therefore, if the image transfer takes a long time, waiting times will occur in the picking and mounting operations, which may reduce production efficiency. In this embodiment, high-speed transfer is made possible by compressing the image signal using DPCM before transfer.
[0029] Next, the encoding process performed by DPCM in the image encoding unit 50 will be explained with reference to Figures 3 to 6. Figures 3 to 5 are flowcharts showing an example of the image encoding process performed by the image encoding unit 50. Figure 6 is an explanatory diagram showing an example of an encoding table used in the encoding process. The following explanation will use the case of encoding a grayscale image in which one pixel is represented by 256 gradations (8 bits) as an example.
[0030] When the image encoding process is executed, the image encoding unit 50 first acquires an image from the side camera 48 (S100). Next, the image encoding unit 50 sets the variable i to a value of 1 (S110) and determines whether the i-th pixel is the first pixel of a line in a sequential scan that scans the image line by line (S120). In this embodiment, a vertically oriented image is handled as the image, as shown in Figure 7. The image is scanned from top to bottom, and when the bottom end is reached, the system moves to the top end of the column one row to the right and repeats the scanning process from top to bottom, so that each column line is scanned from the top left starting pixel to the bottom right ending pixel. Alternatively, the image may be scanned from left to right, and when the right end is reached, the system moves to the left end of the row one row below and repeats the scanning process from left to right, so that each row line is scanned from the top left pixel to the bottom right pixel. In this case, it is preferable to apply this to a horizontally oriented image.
[0031] When the image encoding unit 50 determines that the i-th pixel is the first pixel of a line, it converts the grayscale value of the i-th pixel into a 3-symbol code value (S130), sets the i-th pixel to an encoded pixel (S140), and proceeds to S280. In this embodiment, since 4 bits are used as 1 symbol, the processing in S130 converts the grayscale value of one pixel, which is represented by 8 bits, into a 12-bit code value. In this case, the upper 8 bits (B4 to B11) of the code value are assigned the raw data of the grayscale value, and the lower 4 bits (B0 to B3) of the code value are assigned data indicating that the upper 8 bits are assigned the raw data of the grayscale value (see the 15th code value in Figure 6). Since 8-bit data is converted into 12-bit data, the compression ratio, which is the ratio of the amount of data after conversion to the amount of data before conversion, is 150%.
[0032] If the image encoding unit 50 determines that the i-th pixel is not the first pixel of a line, it calculates the difference D(i) between the grayscale value of the i-th pixel and its predicted value (S150). The predicted value can be, for example, the grayscale value of the (i-1)-th pixel that is adjacent to the i-th pixel. Next, the image encoding unit 50 determines whether or not the (i-1)-th pixel has been encoded (S160). If the image encoding unit 50 determines that the (i-1)-th pixel has been encoded, it proceeds to S180. On the other hand, if the image encoding unit 50 determines that the (i-1)-th pixel has not been encoded, it determines whether the consecutive difference values D(i-1) and D(i), which are the difference value D(i-1) calculated in S150 and the difference value D(i) calculated this time, are a specific pair of values (S170). In this embodiment, the specific sets of values are the set (0,0) where the difference value D(i-1) is 0 and the difference value D(i) is 0, the set (0,+1) where the difference value D(i-1) is 0 and the difference value D(i) is +1, and the set (0,-1) where the difference value D(i-1) is 0 and the difference value D(i) is -1. These were experimentally determined as sets of values that appear frequently in DPCM.
[0033] If the image encoding unit 50 determines that consecutive difference values D(i-1) and D(i) are not a specific pair, it performs image compression using normal DPCM. Specifically, the image encoding unit 50 determines whether the difference value D(i-1) calculated in the previous step is greater than or equal to -α (for example, α is 5) and less than or equal to α (S180), and whether it is greater than or equal to -β (β is a value greater than α, for example, 12) and less than or equal to β (S190). If the image encoding unit 50 determines that the difference value D(i-1) is greater than or equal to -α and less than or equal to α, it converts the difference value D(i-1) into a code value for one symbol (S200), sets the (i-1)th pixel to an encoded pixel (S220), and proceeds to S250. The process in S200 converts the grayscale value of the (i-1)th pixel, which is represented by 8 bits, into a code value of 4 bits (B0 to B3). In this case, the 4 bits (B0 to B3) of the code value are assigned data corresponding to the difference value D(i-1) (see the 2nd to 12th code values in Figure 6). Since 8-bit data is converted to 4-bit data, the compression ratio is 50%. On the other hand, if the image coding unit 50 determines that the difference value D(i-1) is not greater than or equal to -α and less than or equal to α, but greater than or equal to -β and less than or equal to β, it converts the difference value D(i-1) into a 2-symbol code value (S210), sets the (i-1)th pixel to an encoded pixel (S220), and proceeds to S250. The process in S210 converts the grayscale value of the (i-1)th pixel, which is represented by 8 bits, into an 8-bit code value (B0 to B7). In this case, the upper 4 bits (B4-B7) of the code value are assigned data corresponding to the difference value D(i-1), and the lower 4 bits (B0-B3) of the code value are assigned data indicating that the upper 4 bits are assigned data corresponding to the difference value D(i-1) (see code values 16 through 29 in Figure 6). Since 8-bit data is converted to 8-bit data, the compression ratio is 100%. In other words, the amount of data does not increase or decrease.
[0034] In S180 and S190, the image encoding unit 50 determines that the difference value D(i-1) is not greater than or equal to -α and less than or equal to α, nor greater than or equal to -β and less than or equal to β, then converts the grayscale value of the (i-1)th pixel into a 3-symbol code value (S230), sets the (i-1)th pixel as encoded (S240), and proceeds to S250. In this case, similar to S130, the grayscale value of one pixel, which is represented by 8 bits, is converted into a 12-bit code value, resulting in a compression ratio of 150% (see the 15th code value in Figure 6).
[0035] In S170, the image encoding unit 50 determines that consecutive difference values D(i-1) and D(i) correspond to a specific value pair. It then converts the difference values D(i-1) and D(i) into a 4-bit code value (S260), sets the (i-1)th pixel and the ith pixel as encoded (S270), and proceeds to S280. The process in S260 converts the 16-bit grayscale values for two pixels into a 4-bit code value. In this case, the 4 bits (B0 to B3) of the code value are assigned data corresponding to the specific value pair of the two difference values D(i-1) and D(i) (see the 1st, 13th, and 14th code values in Figure 6). Since 16-bit data is converted to 4-bit data, the compression ratio is 25%.
[0036] Next, the image encoding unit 50 determines whether or not the i-th pixel is the last pixel of the line (S250). If the image encoding unit 50 determines that the i-th pixel is not the last pixel of the line, it proceeds to S280. On the other hand, if the image encoding unit 50 determines that the i-th pixel is the last pixel of the line, it determines whether or not the difference value D(i) calculated this time is greater than or equal to -α and less than or equal to α (S300), and whether or not it is greater than or equal to -β and less than or equal to β (S310). If the image encoding unit 50 determines that the difference value D(i) is greater than or equal to -α and less than or equal to α, it converts the difference value D(i) into a code value of one symbol in the same way as in S200 (S320), sets the i-th pixel to the encoded pixel (S340), and proceeds to S280. In this case, the grayscale value of the i-th pixel, which is represented by 8 bits, is converted into a 4-bit code value, so the compression ratio is 50% (see the 2nd to 12th code values in Figure 6). On the other hand, if the image encoding unit 50 determines that the difference value D(i) is not greater than or equal to -α and less than or equal to α, but rather greater than or equal to -β and less than or equal to β, it converts the difference value D(i) into an 8-bit code value in the same way as in S210 (S330), sets the i-th pixel to an encoded pixel (S340), and proceeds to S280. In this case, the grayscale value of the i-th pixel, which is represented by 8 bits, is converted into an 8-bit code value, so the compression ratio becomes 100% (see the code values from the 16th to the 29th in Figure 6).
[0037] If the image encoding unit 50 determines that the difference value D(i) is not greater than or equal to -α and less than or equal to α, nor greater than or equal to -β and less than or equal to β, it converts the grayscale value of the i-th pixel into a 3-symbol code value in the same way as in S230 (S350), sets the i-th pixel as encoded (S360), and proceeds to S280. In this case, as in S130, the grayscale value of one pixel, which is represented by 8 bits, is converted into a 12-bit code value, so the compression ratio becomes 150%, and the amount of data increases.
[0038] When encoding is performed on one or two pixels in this way, the image encoding unit 50 increments the variable i by 1 (S280) and determines whether the value of variable i is greater than the number of pixels, that is, whether encoding has been completed for all pixels (S290). If the image encoding unit 50 determines that the value of variable i is less than or equal to the number of pixels in the image, it returns to S120. On the other hand, if the image encoding unit 50 determines that the value of variable i is greater than the number of pixels in the image, it determines that encoding has been completed for all pixels and terminates the image encoding process.
[0039] Figure 8 is an explanatory diagram showing the number of pixels for each difference value (pixel counter) when the image in Figure 7 is encoded by DPCM. Figure 9 is an explanatory diagram showing the number of each converted value (conversion counter) for 1 to 3 symbols converted when the image in Figure 7 is encoded by DPCM, and the number of each converted value for consecutive difference values. In grayscale images, the difference in gradation between pixels is small, and the frequency of occurrence of difference value (i) approximates a normal distribution centered on 0, as shown in Figure 8. Therefore, as shown in Figure 9, the frequency of occurrence of multiple consecutive difference values D(i-1), D(i) is most frequently for the (0,0) pair, followed by the (0,+1) pair and the (0,-1) pair. Therefore, rather than assigning the relatively infrequently occurring difference values (i) of -6 and +6 to one symbol (4-bit) code value, it is more efficient to assign these difference values (i) to two symbols (8-bit) code values, while grouping consecutive difference values D(i-1), D(i) that occur frequently, such as (0,0), (0,+1), and (0,-1), together to one symbol (4-bit) code value, thereby reducing the overall amount of data.
[0040] Figure 10A is an explanatory diagram showing the number of pixels (pixel counter) and total number of bits in the image of Figure 7. Figure 10B is an explanatory diagram showing the number of each converted value (conversion counter) and total number of bits for symbols 1 to 3 when the image of Figure 7 is encoded one difference value at a time. Figure 10C is an explanatory diagram showing the number of each converted value (conversion counter), the number of pixels (pixel counter), and total number of bits for symbols 1 to 3 when the image of Figure 7 is encoded using the DPCM of this disclosure. Note that in Figure 10B, one converted value always represents one pixel, so the conversion counter is the same as the pixel counter. On the other hand, in Figure 10C, as noted in the remarks, one converted value may represent one pixel or two pixels, so the conversion counter is not necessarily the same as the pixel counter. As shown in the figure, the DPCM of this disclosure, which encodes consecutive difference values D(i-1), D(i) of pairs such as (0,0), (0,+1), and (0,-1) as a single unit, can be seen to reduce the amount of data compared to conventional DPCM, which encodes each difference value D(i) individually.
[0041] It goes without saying that this disclosure is not limited in any way to the embodiments described above, and can be implemented in various forms as long as they fall within the technical scope of this disclosure.
[0042] For example, in the embodiment described above, the processing of images captured by the side camera 48 is performed by the mounting control device 60, but it may also be performed by the mounting head 40. Figure 11 is a block diagram showing the electrical connection relationship between the mounting head 140 and the mounting control device 60 according to another embodiment. The mounting head 140 according to the other embodiment includes, in addition to the side camera 48 and image encoding unit 50 similar to the mounting head 40 of this embodiment, an image processing unit 144 for processing images captured by the side camera 48. The image processing unit 144 is electrically connected to the side camera 48 and the image encoding unit 50 and exchanges signals and data. In this embodiment as well, the processing of images captured by the parts camera 26 and the mark camera 28 is performed by the image processing unit 65 of the mounting control device 60.
[0043] Next, the image processing performed by the image processing unit 144 will be described. Figure 12 is a flowchart showing an example of image processing performed by the image processing unit 144. When image processing is performed, the image processing unit 144 first acquires an image from the side camera 48 (S400). Subsequently, the image processing unit 144 performs image processing on the acquired image (S402). As described above, the image processing is the process of recognizing the component P (side of the component) in the image. The result of the image processing is normal if the component P is recognized in the correct position by the suction nozzle 41, and abnormal if the component P is not recognized (suction error) or if the component P is recognized but its position is different from the correct position (poor suction posture). Next, the image processing unit 144 determines whether the result of the image processing is normal or not (S420). If the image processing unit 144 determines that the result of the image processing is normal, it transmits the result of the image processing to the mounting control device 60 (S430) without transmitting the image, and terminates the image processing. On the other hand, if the image processing unit 144 determines that the image processing result is not normal, it encodes the image acquired in S400 using the image encoding unit 50 (S440), transmits the image processing result and the encoded image to the mounting control device 60 (S450), and terminates the image processing. Thus, the mounting head 40 according to the other embodiment includes an image processing unit 144 that processes images captured by the side camera 48. If the image processing result is normal, only the image processing result is transmitted to the mounting control device 60. If the image processing result is abnormal, the encoded image obtained by encoding the acquired image is transmitted to the mounting control device 60 in addition to the image processing result. This reduces the amount of data transmitted compared to transmitting all images captured by the side camera 48. Note that the image processing unit 144 transmits only the image processing result when the image processing result is normal, and transmits the encoded image in addition to the image processing result when the image processing result is abnormal. However, it may also transmit the encoded image when the image processing result is normal.
[0044] In the embodiment described above, the image encoding unit 50 encodes two consecutive difference values into a single symbol code value when those two consecutive difference values are a set of specific values. However, depending on the image being encoded, the image encoding unit 50 may also encode three consecutive difference values into a single symbol code value when those three consecutive difference values are a set of specific values (for example, a set of (0,0,0)).
[0045] In the embodiment described above, the mounting head 40 is connected to the mounting control device 60 by a wire (optical fiber cable 55), but the mounting head 40 may also be connected to the mounting control device 60 via wireless communication. That is, the mounting head 40 may transmit the encoded image encoded by the image encoding unit 50 to the mounting control device 60 via wireless communication.
[0046] In the embodiments described above, the image encoding device (image encoding unit 50) of the present disclosure was applied to encoding images to be transmitted to a control device, but it may also be applied to encoding images to be stored in the storage unit 62. In this case, the image encoding unit 50 may be provided in the implementation control device 60.
[0047] In the embodiments described above, the image encoding device (image encoding unit 50) of the present disclosure was applied to a component mounting machine 10, but it is not limited to this and can be applied to any other device equipped with a camera, such as a multi-joint robot.
[0048] As explained above, the image encoding device of this disclosure encodes a predetermined number of bits of data into which multiple consecutive difference values are a predetermined set of values. By defining a set of values with a high frequency of occurrence among multiple consecutive difference values as a predetermined set of values, multiple difference values can be encoded into a single data. Therefore, the compression ratio can be increased compared to encoding each difference value into a single data. As a result, the image compression ratio can be improved without degrading image quality.
[0049] In the image encoding device of this disclosure, if a plurality of consecutive difference values are not a set of the specified values, one of the difference values may be encoded into data within a predetermined number of bits in a first data range, and if a plurality of consecutive difference values are a set of the specified values, the plurality of difference values may be encoded into data within a second data range different from the predetermined number of bits in the first data range. In this way, it is possible to further increase the compression ratio by mixing data where one difference value is encoded into one data and data where multiple difference values are encoded into one data within a predetermined number of bits.
[0050] Furthermore, in the image encoding device of this disclosure, the consecutive multiple difference values may be two consecutive difference values. In this case, the set of specific values may include at least one of the following: a set of two difference values where the previous difference value is 0 and the next difference value is 0; a set of two difference values where the previous difference value is 0 and the next difference value is +1; and a set of two difference values where the previous difference value is 0 and the next difference value is -1. This is because the occurrence rate of the set of specific values is high, and it has been experimentally confirmed that the total amount of data can be reduced by encoding the two difference values into a single data when a set of specific values appears as two difference values.
[0051] This disclosure is not limited to the form of an image encoding device, but can also be in the form of an image processing system. Specifically, the image processing system of this disclosure encodes an image using differential pulse code modulation, which encodes the difference between the grayscale data of one pixel and the grayscale data of the previous pixel. The system comprises an encoding unit that encodes a plurality of differential values into data of a predetermined number of bits when a plurality of consecutive differential values are a set of predetermined specific values, and a decoding unit that receives the encoded data from the encoding unit via communication and decodes the image from the input encoded data. As a result, similar to the image encoding device of this disclosure, the image compression ratio can be further improved without degrading image quality. As a result, the amount of data transmitted can be reduced, enabling high-speed transfer.
[0052] Furthermore, this disclosure can also take the form of a component mounting machine. That is, the component mounting machine of this disclosure comprises the image processing system of this disclosure described above, wherein the encoding unit is installed in a movable part and the decoding unit is installed in a fixed part. In this case, the fixed part may include an image processing unit that processes the image decoded by the composite unit. Alternatively, the movable part may include an image processing unit that acquires and processes images, and the encoding unit may encode the image and transmit it to the decoding unit when the result of image processing by the image processing unit is a specific result. This reduces the amount of data transmitted compared to transmitting all acquired images. A "specific result" includes cases where the result of image processing is abnormal. [Industrial applicability]
[0053] This disclosure can be used in the manufacturing industry for image coding devices, image processing systems, component mounting machines, and other applications. [Explanation of Symbols]
[0054] 10 Component mounting machine, 11 Base, 21 Component supply device, 22 Board transport device, 25 Display device, 26 Parts camera, 27 Light source unit, 28 Mark camera, 29 Light source unit, 30 Head movement device, 32 X-axis slider, 34 Y-axis slider, 36 X-axis motor, 37 X-axis encoder, 38 Y-axis motor, 39 Y-axis encoder, 40, 140 Mounting head, 41 Suction nozzle, 42 R-axis motor, 43 θ-axis motor, 44 Z-axis motor, 45 R-axis encoder, 46 θ-axis encoder, 47 Z-axis encoder, 48 Side camera, 49 Light source unit, 50 Image encoding unit, 51 Optical communication unit, 55 Optical fiber cable, 60 Mounting control device, 61 CPU, 62 Memory unit, 63 Servo amplifier, 64 Image decoding unit, 65 Image processing unit, 66 Input / output interface, 67 Optical communication unit, 150 Image processing unit, P component, S substrate.
Claims
1. An image encoding device that encodes an image using differential pulse code modulation, which encodes the difference between the grayscale data of one pixel and the grayscale data of the previous pixel, The system determines whether a set of consecutive difference values is a predetermined set of specific values. If the set of consecutive difference values is not a set of specific values, one of the difference values is encoded into data within a first data range. If the set of consecutive difference values is a set of specific values, the set of consecutive difference values is encoded into data within a second data range different from the first data range. Image encoding device.
2. An image encoding apparatus according to claim 1, The aforementioned series of difference values are two consecutive difference values. Image encoding device.
3. The image encoding apparatus according to claim 2, The set of specific values includes at least one of the following: a set of two difference values where the previous difference value is 0 and the next difference value is 0; a set of two difference values where the previous difference value is 0 and the next difference value is +1; and a set of two difference values where the previous difference value is 0 and the next difference value is -1. Image encoding device.
4. An encoding unit that encodes an image using differential pulse code modulation, which encodes the difference between the grayscale data of a pixel and the grayscale data of the previous pixel, and determines whether a plurality of consecutive difference values are a predetermined set of specific values, and if the plurality of consecutive difference values are not a set of specific values, encodes one of the difference values into data within a first data range, and if the plurality of consecutive difference values are a set of specific values, encodes the plurality of consecutive difference values into data within a second data range different from the first data range, A decoding unit receives encoded data from the encoding unit via communication and decodes the image from the input encoded data. An image processing system equipped with the following features.
5. A component mounting machine comprising the image processing system described in claim 4, The encoding unit is installed in the movable part, The decoding unit is installed in the fixed part. Component mounting machine.
6. A component mounting machine according to claim 5, The fixed part is equipped with an image processing unit that processes the image decoded by the decoding unit, Component mounting machine.
7. A component mounting machine according to claim 5, The movable part is equipped with an image processing unit that acquires and processes images, The encoding unit encodes the image and transmits it to the decoding unit when the result of image processing by the image processing unit is a specific result. Component mounting machine.