This application claims the priority benefit of Taiwan application serial no. 111128072, filed on Jul. 27, 2022. The entirety of the above-mentioned patent application is hereby incorporated by reference herein and made a part of this specification.
The disclosure relates to an image adjustment, and in particular relates to an image signal adjustment method of a detection device.
During image generation, it is often encountered that the generated image has defects, such as defect points or defect lines. Nowadays, image adjustment is performed by means of extrapolation by comparing the surrounding spectrum through Fourier transform. However, the image adjustment method using the extrapolation method requires high computing power in the computing device, and the computing time for image adjustment is quite long. Therefore, for the practical application environment, there are limitations to the computing device and the inconvenience of being time-consuming, so that a highly compatible and high-performance image computing method may not be provided.
The disclosure is directed to an image signal adjustment method of a detection device, which may improve image defects and/or shorten the operation time of an image adjustment function.
According to an embodiment of the disclosure, an image signal adjustment method of a detection device of the disclosure is provided. The detection device may output an image signal including a multiple subpixels. The image signal adjustment method includes the following steps. A subpixel to be adjusted is located. Gray-scale values of subpixels in a first direction passing through the subpixel to be adjusted are analyzed. The gray-scale values of the subpixels in the first direction are used to calculate a gray-scale value of the subpixel to be adjusted.
Based on the above, the image signal adjustment method of the detection device of the disclosure may improve the defect points in the image, and may realize the image adjustment function with low power consumption and/or shortened operation time.
In order to make the aforementioned features and advantages of the disclosure comprehensible, embodiments accompanied with drawings are described in detail below.
References of the exemplary embodiments of the disclosure are to be made in detail. Examples of the exemplary embodiments are illustrated in the drawings. If applicable, the same reference numerals in the drawings and the descriptions indicate the same or similar parts.
Certain terms may be used throughout the disclosure and the appended patent claims to refer to specific elements. It should be understood by those skilled in the art that electronic device manufacturers may refer to the same components by different names. The disclosure does not intend to distinguish between components that have the same function but have different names. In the following description and patent claims, words such as “comprising” and “including” are open-ended words, so they should be interpreted as meaning “including but not limited to . . . ”.
In the disclosure, wordings used to indicate directions, such as “up,” “down,” “front,” “back,” “left,” and “right,” merely refer to directions in the accompanying drawings. Therefore, the directional wordings are used to illustrate rather than limit the disclosure. In the accompanying drawings, the drawings illustrate the general features of the methods, structures, and/or materials used in the particular embodiments. However, the drawings shall not be interpreted as defining or limiting the scope or nature covered by the embodiments. For example, the relative sizes, thicknesses, and locations of the layers, regions, and/or structures may be reduced or enlarged for clarity.
In some embodiments of the disclosure, terms related to joining and connecting, such as “connected”, “interconnected”, etc., unless otherwise defined, may mean that two structures are in direct contact, or may also mean that two structures are not in direct contact, in which there are other structures located between these two structures. The terms related to joining and connecting can also include the case where both structures are movable, or both structures are fixed. Furthermore, the term “coupled” includes any direct or indirect means of electrical connection. In the case of a direct electrical connection, the end points of two elements on a circuit directly connect to each other, or connect to each other through a conductive wire. In the case of indirect electrical connection, a switch, a diode, a capacitor, an inductor, a resistor, other suitable elements, or a combination thereof, but not limited therein, is between the end points of two elements on a circuit.
The terms “about”, “equal to”, “equal” or “same”, “substantially” or “generally” are interpreted as within 20% of a given value or range, or interpreted as within 10%, 5%, 3%, 2%, 1%, or 0.5% of the given value or range.
In the disclosure, the thickness, length, and width may be measured by adopting a measurement method such as an optical microscope (OM), and the thickness or width can be measured from a cross-sectional image in an electronic microscope, but not limited thereto. In addition, any two values or directions used for comparison may have certain errors. Furthermore, the terms “a given range is from a first value to a second value”, “a given range is within a range from the first value to the second value” means that the given range includes the first value, the second value, and other values in between. If a first direction is perpendicular to a second direction, an angle between the first direction and the second direction may be between 80 degrees and 100 degrees; if the first direction is parallel to the second direction, an angle between the first direction and the second direction may be between 0 degrees and 10 degrees.
The terms such as “first”, “second”, etc. used in the description and the patent claims are used to modify elements, which do not imply and represent that the, or these, components have any previous ordinal numbers, and also does not represent the order of a certain element and another element, or the order of the manufacturing method. The use of these ordinal numbers is to only clearly distinguish an element with a certain name from another element with the same name. The same terms may not be used in the patent claims and the description, and accordingly, the first component in the description may be the second component in the patent claims. It should be noted that, in the following embodiments, the technical features in several different embodiments can be replaced, reorganized, and mixed to complete other embodiments without departing from the spirit of the disclosure.
It should be noted that, in the following embodiments, the features in several different embodiments can be replaced, reorganized, and mixed to complete other embodiments without departing from the spirit of the disclosure. As long as the features of the various embodiments do not violate the spirit of the disclosure or conflict with one another, they can be mixed and matched arbitrarily.
Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. It is understood that these terms, such as those defined in commonly used dictionaries, should be interpreted as having meanings consistent with the relevant art and the background or context of the disclosure, and should not be interpreted in an idealized or overly formal manner, unless otherwise defined in the embodiments of the disclosure.
In the disclosure, a detection device may be a device for detecting light, image, 2D image, 3D image, gray-scale image, but not limited thereto. In the disclosure, a detection device may include electronic elements, and the electronic elements may include passive elements and active elements, such as a capacitor, a resistor, an inductor, a diode, a transistor, and the like. The diode may include a light emitting diode or a photodiode. The light emitting diode may include, for example, an organic light emitting diode (OLED), a mini light emitting diode (mini LED), a micro light emitting diode (micro LED), or a quantum dot light emitting diode (quantum dot LED), but not limited thereto. In the disclosure, the detection device may be an X-ray device, and may be used to obtain detection images (e.g., X-ray images). The X-ray device includes an image detection module, a processor, and a memory. The image detection module may include a detector array, in which the detector array includes multiple detectors that may be used to detect X-rays or visible light. When the image detection module performs detection, the detection target may be disposed between the X-ray light source and the image detection module. The X-ray light source may illuminate the detection target, and the image detection module generates detection signals and provides the detection signals to the processor.
In another embodiment, the detection device may be, for example, an electronic device including a processor and a memory, such as a personal computer (PC), a laptop, a tablet, or a smart phone and such equipment, and may output according to user control or automatically output control signals to image detection devices (e.g., X-ray devices). The processor may receive the image signal transmitted by the detection device, and the processor may be a field programmable gate array (FPGA) or a graphics processing unit (GPU), or other suitable elements. Also, the processor may be used to execute the modules stored in the memory. The memory may be a dynamic random access memory (DRAM). Hereinafter, the detection device is used as the electronic device for outputting the image signal to illustrate the disclosure, but the disclosure is not limited thereto.
In step S120, the processor may analyze the gray-scale values of the subpixels in a first direction passing through the subpixel to be adjusted. Specifically, the processor may calculate the change of the gray-scale value of the adjacent subpixels of the subpixel to be adjusted, and obtain the subpixels whose difference of gray-scale value between adjacent subpixels is smaller than a threshold value among the multiple subpixels on the same line. The straight line is a virtual straight line passing through the subpixel to be adjusted, or called a vector. In this embodiment, the processor may use a direction in which the difference between the gray-scale values of adjacent subpixels among the subpixels on the same line as the subpixel to be adjusted is smaller than a threshold value as the first direction. Next, the processor may analyze the gray-scale values of multiple subpixels in the first direction passing through the subpixel to be adjusted in the image signal.
In step S130, the processor may use the gray-scale values of multiple subpixels in the first direction to calculate the gray-scale value of the subpixel to be adjusted. Specifically, the processor may use the gray-scale values of multiple subpixels in the first direction (i.e., the direction in which the difference between the gray-scale values of adjacent subpixels is smaller than the threshold value) as the reference value of the subpixel to be adjusted, to calculate the gray-scale value of the subpixel to be adjusted. In one embodiment, the processor may obtain the left subpixel and the right subpixel located in the first direction and adjacent to the subpixel to be adjusted. Moreover, the processor may take the average value of the gray-scale values of the left subpixel and the right subpixel as the gray-scale value of the subpixel to be adjusted.
After step S203 is executed, if the image contains a defect position map, then step S205 is executed. In step S205, the processor may find the position of the defect point. From left to right and from top to bottom at each of the defect point position in the image signal, the positions of the defect points to be adjusted and its subpixels are found one by one in the image signal adjustment process. Next, in step S206, the processor may evaluate the vector. In step S207, the processor may determine whether the number of usable vectors is greater than 0. If the number of usable vectors is not greater than 0, step S208 is executed to end the current image signal adjustment process. If the number of usable vectors is greater than 0, step S209 is executed. In step S209, the processor may execute step S210 on at least one or more of the usable vectors one by one. In step S210, the processor may calculate the priority of the usable vectors.
In step S211, the processor may determine that the usable vector is a bilaterally usable vector or a unilaterally usable vector. If the usable vector is a unilaterally usable vector, then step S212 and step S213 are executed. If the usable vector is a bilateral usable vector, then step S214 and step S215 are executed. In this regard, with the subpixel to be adjusted as the center, it is a bilateral usable vector if both sides of the usable vector are usable vectors. With the subpixel to be adjusted as the center, it is a unilaterally usable vector if only one side is usable.
In step S212 and step S214, the processor may calculate the compensation coefficient. Specifically, the compensation coefficient of the bilaterally usable vector may be calculated according to the following Formula 1. In Formula 1, Il is the gray-scale value of the first usable subpixel on the left side of the subpixel to be adjusted as the center. Ir is the gray-scale value of the first usable subpixel on the right side of the subpixel to be adjusted. And, the compensation coefficient of the unilaterally usable vector may be calculated according to the following Formula 2. In Formula 2, Iouter is the gray-scale value of the usable subpixel near the outer side of the subpixel to be adjusted as the center. Iinner is the gray-scale value of usable subpixel near the inner side of the subpixel to be adjusted.
1/(|Il−Ir|+1) Formula 1
1/(|Iouter−Iinner|+1) Formula 2
In step S213 and step S215, the processor may calculate the compensation value. Specifically, the compensation value of the bilaterally usable vector may be calculated according to the following Formula 3. In Formula 3, Pr is the position of the first usable subpixel on the right side of the subpixel to be adjusted as the center. Pl is the position of the first usable subpixel on the left side of the subpixel to be adjusted as the center.
(Il×Pr2+Ir×Pl2)/(Pl2+Pr2) Equation 3
2Iinner−Iouter Formula 4
It should be noted that the usable subpixels near the inner side and the usable subpixels near the outer side are adjacent usable subpixels. Referring to
In step S216, the processor may correct the vector to execute step S217 according to the compensation coefficient and compensation value of each of the usable vectors. In step S217, the processor may recalculate the compensation coefficient for each of the usable vectors. In step S218, the processor may calculate the correction value of the subpixel to be adjusted, and then step S219 is executed to end the process of adjusting the image signal.
In step S303, the processor may determine whether the first and second subpixels on the right side of the subpixel to be adjusted 300_DP are usable. If yes, the processor executes step S304. If not, the processor executes step S307. Specifically, as shown in
In step S304, the processor may determine whether the first and second subpixels on the left side are usable. If yes, the processor executes step S305. If not, the processor executes step S306. In step S305, the processor may determine that the vector is bilaterally usable. Referring to
In step S306, the processor may determine whether the second and third subpixels on the left side are usable. If yes, the processor executes step S305. If not, the processor executes step S314. In step S307, the processor may determine whether the second and third subpixels on the right side are usable. If yes, the processor executes step S308. If not, the processor executes step S309. In step S308, the processor may determine whether the first and second subpixels on the left side are usable. If yes, the processor executes step S305. If not, the processor executes step S312. In step S309, the processor may determine whether the first and second subpixels on the left side are usable. If yes, the processor executes step S311. If not, the processor executes step S310. In step S310, the processor may determine whether the second and third subpixels on the left side are usable. If yes, the processor executes step S311. If not, the processor executes step S313.
In step S311 and step S314, the processor may determine that the vector is unilaterally usable. In step S312, the processor may determine whether the second and third subpixels on the left side are usable. If yes, the processor executes step S305. If not, the processor executes step S311. In step S313, the processor may determine that the vector is unusable. Referring to
As mentioned above, the processor may then execute step S309 on the vector 32V. The processor may determine that a first subpixel 321 on the left side and a second subpixel 332 on the left side on the vector 32V are also defective points, and therefore are unusable subpixels. Next, the processor may execute step S310 to determine that the second subpixel 332 on the left side and a third subpixel 333 on the left side on the vector 32V are still defective points and therefore are unusable subpixels. After the determination result in step S310 is “No”, the processor may execute step S313 to further determine that the vector 32V is an unusable vector. In addition, the processor may execute step S315. In step S315, the processor may determine whether the evaluation of the vectors around the defect point are completed. Specifically, the processor may determine whether all four vectors around the subpixel to be adjusted 300_DP (i.e., the defect point) have completed the evaluation. Referring to
Referring to
In step S403, the processor may determine whether the threshold value is smaller than a minimum value. Specifically, the minimum value is a preset value, and may be any positive integer according to the setting of the user, such as 4, 5, or 10, but the disclosure is not limited thereto. In step S404, when the processor determines that the threshold value is smaller than the minimum value, the minimum value is set as the threshold value. In this embodiment, the threshold value obtained in step S402 is 4, and the minimum value is set to 5. Therefore, the processor may perform step S404 to take 5 of the minimum value as the threshold value of this embodiment (i.e., the threshold value is adjusted to 5).
In step S405, the processor may determine the priority according to the unilaterally/bilaterally usable vectors. If it is a bilaterally usable vector, the processor executes step S406. If it is a unilaterally usable vector, the processor executes step S412. In step S406, in the bilaterally usable vector, the processor may determine whether the difference between the gray-scale values of the subpixels on both sides of the subpixel to be adjusted is smaller than the threshold value. If yes, the processor executes step S407. If not, the processor executes step S409. In step S407, the processor may determine whether the difference between the gray-scale values of the subpixels on the right side of the subpixel to be adjusted is smaller than the threshold value. If yes, the processor executes step S408. If not, the processor executes step S411. In step S408, the processor may determine whether the difference between the gray-scale values of the left side subpixel of the subpixel to be adjusted is smaller than the threshold value, and if so, step S410 is executed. If not, the processor executes step S411. In step S409, the processor may determine that it belongs to the lowest priority (fourth priority). In step S410, the processor may determine that it belongs to the first priority, which is also the highest priority. Specifically, in step S405, since the vector 33V is a bilaterally usable vector, the processor may then execute step S406.
In step S406, the processor may determine that the difference between the gray-scale values of the subpixels on both sides of the subpixel to be adjusted in the vector 33V is 2 (228 minus 226 and taking the absolute value) and is smaller than the threshold value. In step S407, the processor may determine that the difference between the gray-scale values of the right side subpixels of the subpixel to be adjusted in the vector 33V is 3 (226 minus 223 and taking the absolute value) and is smaller than the threshold value. In step S408, the processor may determine that the difference between the gray-scale values of the left side subpixels of the subpixel to be adjusted in the vector 33V is 4 (228 minus 224 and taking the absolute value). In steps S406 to S408, since the difference between the two sides, the difference between the right side, and the difference between the left side of the vector 33V are all smaller than the threshold value, the processor may execute step S410 to determine that the vector 33V has the highest priority.
In step S411, the processor may determine that it belongs to the second priority. In step S412, since the vector is a unilaterally usable vector, the processor may determine that the vector belongs to the third priority. In this embodiment, the difference between the gray-scale values of the subpixels on both sides of the subpixel to be adjusted in the vector 34V is 4 (216 minus 220 and taking the absolute value), and the difference between the gray-scale values of the right side subpixels of the subpixel to be adjusted in the vector 34V is 36 (216 minus 180 and taking the absolute value). Therefore, the processor may perform step S411 to determine that the vector 34V is the second priority. Since the difference between the gray-scale values of the subpixels on both sides of the subpixel to be adjusted in the vector 35V is 16 (160 minus 144 and taking the absolute value), the processor may execute step S409 to determine that the vector 35V has the lowest priority.
In step S505, the processor may determine whether there is a second priority. In step S506, the processor may calculate the median of the gray-scale values of the adjacent subpixels around the subpixel to be adjusted. In step S507, the processor may first set all compensation coefficients to 0. In step S508, the processor may evaluate four vectors around the defect point. In step S509, the processor may determine whether the vector is bilaterally usable.
In another embodiment, when there are multiple vectors with the highest priority, after the processor executes the step S503 above, the processor then executes the step S506 to calculate the median of the gray-scale values of the adjacent multiple usable subpixels around the subpixel to be adjusted. In addition, the processor executes steps S507 to S510 to compare the threshold value with the gray-scale values of subpixels in the first direction (the highest priority vector, e.g., vector 33V) and the gray-scale values of subpixels in the second direction (the second priority vector) to determine the respective weight value (compensation coefficient).
Specifically, in step S510, the processor may determine whether the difference between the gray-scale values of the subpixels on both sides is smaller than the threshold value. If the difference between the gray-scale values of the subpixels on both sides is smaller than the threshold value, the processor executes step S511. For example, in the vector 35V shown in
In this embodiment, the processor may determine the weight value by using the gray-scale values of multiple subpixels around the subpixel to be adjusted. Specifically, in step S511, the processor may calculate a new compensation value and compensation coefficient. The new compensation coefficient may be calculated according to the following Formula 6. In Formula 6, Med(I) is the median of the gray-scale values of adjacent usable subpixels of the subpixel to be adjusted. ICorrection is the average gray-scale value of the usable subpixels on both sides of the bilaterally usable vector. β is used to avoid zero denominator terms and may be set to any positive number. k is used to enhance the inverse relationship between the image intensity difference and the compensation coefficient, and may be set to any positive integer. In this embodiment, β may be, for example, 0.01, and k may be, for example, 3, but the disclosure is not limited thereto.
α=1/(|ICorrection−Med(I)|+β)k Formula 6
In step S512, the processor may correct the vector. In step S513 and step S514, the processor may end the process of recalculating the compensation coefficient. In other words, the image signal adjustment method of the disclosure may calculate the gray-scale value of the subpixel to be adjusted according to the degree of change of the subpixels in at least one direction passing through the subpixel to be adjusted. For example, when the difference between the gray-scale values of the subpixels in the first direction and the second direction is smaller than the threshold value, the processor may use the gray-scale values of the subpixels in the first direction and the gray-scale values of the subpixels in the second direction, the weight value corresponding to the first direction and the weight value corresponding to the second direction to calculate the gray-scale value of the subpixel to be adjusted. When the degree of change of the gray-scale values of multiple subpixels in the first direction, the second direction, the third direction, and the fourth direction are similar (for example, passing through the first direction, the second direction, the third direction, and the fourth direction, the difference between the gray-scale values of the multiple sub-pixels in the respective directions are all smaller than the threshold value), the processor may use the gray-scale values of the multiple subpixels in the first direction, the gray-scale values of the multiple subpixels in the second direction, the gray-scale values of the multiple subpixels in the third direction, the gray-scale values of the multiple subpixels in the fourth direction, the weight value corresponding to the first direction, the weight value corresponding to the second direction, the weight value corresponding to the third direction, and the weight value corresponding to the fourth direction to calculate the gray-scale value of the subpixel to be adjusted.
Referring to
It is worth noting that when there is only one vector with the highest priority, the direction of the vector is the first direction, and the image signal adjustment method of the disclosure only requires the processor to analyze the gray-scale values of multiple subpixel in the first direction (step S120), and calculate and obtain the gray-scale value of the subpixel to be adjusted according to the gray-scale values of the subpixels in the first direction (step S130). In this way, the image signal adjustment method of the disclosure may have the function of adjusting and compensating the image signal with low computing power and/or better efficiency according to the subpixel distribution of different image signals.
To sum up, the image signal adjustment method of the detection device of the disclosure may compensate the defect points on the image signal according to the subpixel information around the defect point in the image signal, and improve the effect of compensating the image signal by determining the degree of change of the grayscale value of the surrounding sub-pixels, which may also be implemented in computing devices with low computing power. In this way, the efficiency and/or compatibility of the image signal adjustment method of the detection device of the disclosure may be improved, and a stable and/or better image signal compensation/adjustment function may be provided.
Finally, it should be noted that the foregoing embodiments are only used to illustrate the technical solutions of the disclosure, but not to limit the disclosure; although the disclosure has been described in detail with reference to the foregoing embodiments, persons of ordinary skill in the art should understand that the technical solutions described in the foregoing embodiments can still be modified, or parts or all of the technical features thereof can be equivalently replaced; however, these modifications or substitutions do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the disclosure.
Number | Date | Country | Kind |
---|---|---|---|
111128072 | Jul 2022 | TW | national |