Image stretching method and apparatus
By using a monotonic function and a preset stretching inflection point in medical image processing to calculate the baseline offset and generate a stretching curve, the problem that Gamma transformation cannot distinguish the stretching of the target region is solved, thus improving image contrast and detail.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN ANGELL TECH
- Filing Date
- 2022-08-10
- Publication Date
- 2026-05-01
AI Technical Summary
Existing Gamma transformations cannot effectively distinguish between different target regions for stretching in medical image processing, resulting in insignificant improvement in image contrast. Furthermore, custom stretching algorithms are computationally complex and depend on parameter accuracy.
A monotonic function is used as the reference function. The reference offset is calculated by setting the stretching inflection point. The reference function and the offset are combined as the gamma parameter to generate a stretching curve to achieve differentiated stretching.
It improves the image's layering and overall contrast, enhancing the representation of image details.
Smart Images

Figure CN115409702B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing, and in particular to an image stretching method and apparatus. Background Technology
[0002] In the medical field, X-ray images captured by medical imaging equipment typically undergo a series of preprocessing and detail enhancement processes, followed by grayscale transformation to stretch the contrast and brightness of the image, and finally output to the diagnostic physician after black and white inversion.
[0003] Gamma transform is a primary method for image grayscale transformation. By setting different gamma parameters, the curvature of the gamma curve can be adjusted, or the transform function can be modified to obtain curves with varying degrees of stretching. However, the gamma parameter remains constant across the entire grayscale range, applying the same stretching trend to all regions; all values are uniformly enhanced or weakened, only to varying degrees. For example, when the gamma parameter is close to 1, it resembles a linear transform, with minimal stretching effect. Conversely, when the gamma parameter is less than 1 and the smaller it is, the stronger the stretching of low grayscale values, mapping the low grayscale range to a wider grayscale range while compressing high grayscale values into a narrower range. However, since all grayscale values are enhanced, and the greater the enhancement, the greater the increase in image brightness, the image contrast may not improve and could even worsen. In medical image processing, modifications are often needed to the basic gamma transform, but the core principle remains the same. Therefore, the stretching effect of gamma transform is often not ideal for some medium-to-high grayscale images.
[0004] When diagnosing using X-ray images, the primary focus is on observing a specific type of target, such as bone edges or textures, tissue textures, or metal implants. Therefore, image stretching needs to differentiate the target content from other content as much as possible, creating a clear contrast and highlighting the main subject. However, the overall transformation of Gamma transformation with a fixed gamma parameter cannot effectively perform differentiated stretching for different target tissue regions.
[0005] Other custom stretching algorithms typically involve processes such as ROI (region of interest) extraction, parameter and calculation rule definition, and generation of relevant mathematical mapping relationships, resulting in a complex overall algorithm flow. Medical images generally have high resolution and high grayscale, leading to low computational efficiency for these stretching algorithms. Furthermore, custom algorithms require defining numerous parameters and calculation rules, such as threshold parameters, boundary parameters, or piecewise calculations. This high parameter variability means the processing effectiveness heavily depends on the accuracy of the parameters and calculation rules. Summary of the Invention
[0006] The technical problem to be solved by the present invention is: an image stretching method and device to enhance the image stretching effect, thereby improving the overall contrast of the image.
[0007] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0008] An image stretching method includes the following steps:
[0009] Obtain the baseline function and preset stretching inflection point;
[0010] The reference function is a monotonic function, and the range of values of the reference function and the preset stretching inflection point is adapted to the gray value range of the image to be processed.
[0011] Calculate the coordinates of the preset stretching inflection point on the reference function to obtain the coordinates of the preset stretching inflection point;
[0012] The reference offset is obtained based on the difference between the coordinates of the preset stretching inflection point and the gamma reference parameter;
[0013] The stretching curve is obtained by using the sum of the reference function and the reference offset as the gamma parameter;
[0014] The image to be processed is stretched according to the stretching curve.
[0015] The beneficial effects of this invention are as follows: By using a monotonic function as the reference function, and obtaining the corresponding coordinates by substituting the preset stretching inflection point into the reference function, the difference between the reference function at the preset stretching inflection point and the gamma reference parameter (i.e., 1) is further calculated to obtain the reference offset. Then, the reference function and the reference offset are used as the gamma parameter, so that the stretching curve intersects the function y = x (gamma parameter is 1) at the preset stretching inflection point. Since the reference function is a monotonic function, the gamma parameter value calculated on one side of the stretching curve at the preset stretching inflection point is greater than 1, and the gamma parameter value calculated on the other side is less than 1. Thus, the curves on both sides of the stretching curve at the preset stretching inflection point form a convex curve (gamma parameter value is less than 1) and a concave curve (gamma parameter value is greater than 1) respectively compared to the function y = x. Therefore, when stretching an image using the stretching curve, the concavity and convexity of the stretching curve can be used to perform differentiated stretching of the image near the inflection point, making the stretched X-ray image more layered, with more comprehensive detail, and improving the overall contrast of the image. Attached Figure Description
[0016] Figure 1 This is a flowchart illustrating the steps of an image stretching method in this embodiment.
[0017] Figure 2This is an image stretching effect diagram based on a reference function in an image stretching method of this embodiment;
[0018] Figure 3 This is a flowchart of another step in an image stretching method according to an embodiment of the present invention;
[0019] Figure 4 These are curve images at different steps of an image stretching method in this embodiment;
[0020] Figure 5 This is an image stretching effect diagram of the stretching curve under different parameters in an image stretching method of this embodiment;
[0021] Figure 6 This is a comparison diagram of the stretching curve and the effect of Gamma change on the processing of unreversed tibia and fibula images in this embodiment.
[0022] Figure 7 This is a comparison diagram of the stretching curve and Gamma change on the processing of inverted abdominal and lumbar spine images in this embodiment.
[0023] Figure 8 This is a schematic diagram of the structure of an image stretching device according to an embodiment of the present invention. Detailed Implementation
[0024] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.
[0025] Please refer to Figure 1 An image stretching method, characterized by comprising the following steps:
[0026] Obtain the baseline function and preset stretching inflection point;
[0027] The reference function is a monotonic function, and the range of values of the reference function and the preset stretching inflection point is adapted to the gray value range of the image to be processed.
[0028] Calculate the coordinates of the preset stretching inflection point on the reference function to obtain the coordinates of the preset stretching inflection point;
[0029] The reference offset is obtained based on the difference between the coordinates of the preset stretching inflection point and the gamma reference parameter;
[0030] The stretching curve is obtained by using the sum of the reference function and the reference offset as the gamma parameter;
[0031] The image to be processed is stretched according to the stretching curve.
[0032] As described above, the beneficial effects of this invention are as follows: by using a monotonic function as the reference function, and by substituting the preset stretching inflection point into the reference function to obtain the corresponding coordinates, the difference between the reference function at the preset stretching inflection point and the gamma reference parameter (i.e., 1) is further calculated to obtain the reference offset. Then, the reference function and the reference offset are used as the gamma parameter, so that the stretching curve intersects the function y = x (gamma parameter is 1) at the preset stretching inflection point. Since the reference function is a monotonic function, the gamma parameter value calculated on one side of the stretching curve at the preset stretching inflection point is greater than 1, and the gamma parameter value calculated on the other side is less than 1. Thus, the curves on both sides of the stretching curve at the preset stretching inflection point form a convex curve (gamma parameter value is less than 1) and a concave curve (gamma parameter value is greater than 1) respectively compared to the function y = x. Therefore, when stretching an image using the stretching curve, the concavity and convexity of the stretching curve can be used to perform differentiated stretching of the image near the inflection point, making the stretched X-ray image more layered, with more comprehensive detail, and improving the overall contrast of the image.
[0033] Furthermore, obtaining the stretching curve by using the sum of the reference function and the reference offset as the gamma parameter includes:
[0034] The variable offset function is obtained by multiplying the offset relationship between the preset stretching inflection point and the grayscale value of the image to be processed with the reference offset.
[0035] The sum of the variable offset function and the reference function is used as the gamma parameter to obtain the stretching curve.
[0036] As described above, a variable offset function is obtained by multiplying the offset relationship between the preset stretching inflection point and the grayscale value of the image to be processed with the reference offset, and a stretching curve is further obtained. This ensures that the offset varies with the input image independent variable, while also ensuring that when the independent variable is the preset stretching inflection point, the point is still the inflection point of the stretching curve. This improves the image stretching effect while ensuring that the position of the preset stretching inflection point remains unchanged.
[0037] Further, the step of obtaining the variable offset function by multiplying the offset relationship between the preset stretching inflection point and the grayscale value of the image to be processed with the reference offset includes:
[0038] The offset relationship between the preset stretching inflection point and the function's independent variable is subjected to an exponential change to obtain an exponentially changed offset relationship.
[0039] The variable offset function is obtained by multiplying the exponential change offset relationship with the baseline offset.
[0040] As described above, by exponentially changing the offset relationship between the preset stretching inflection point and the grayscale value of the image to be processed, a variable offset function is obtained. This allows for the control of the change in the variable offset function according to the different images to be processed, thereby achieving the optimal image stretching effect.
[0041] Furthermore, the process of obtaining the stretch curve includes:
[0042] Obtain the offset index and use it as the exponential parameter of the gamma parameter to obtain the stretching curve.
[0043] As described above, by obtaining the offset index and using it as the exponent parameter of the gamma parameter, the intensity of image stretching can be adjusted by changing the offset index. When the offset index is greater than 1 and gradually increases, the stretching curvature is greater, and the contrast improvement of the main image area is more obvious.
[0044] Further, the offset index is obtained, and the offset index is used as the exponential parameter of the gamma parameter to obtain the stretching curve, which includes:
[0045]
[0046] Among them, y s Let x be the grayscale value of the stretched image, and y be the grayscale value of the image to be processed. sig t is the base function, t is the base offset or variable offset function, and p is the offset exponent.
[0047] As described above, stretching the image to be processed by obtaining the stretch curve can effectively improve the difference between the two sides of the stretch inflection point and enhance the overall contrast of the image.
[0048] Further, stretching the image to be processed according to the stretching curve includes:
[0049] The image to be processed is then normalized.
[0050] The image to be processed, after normalization, is stretched using the stretching curve.
[0051] As described above, by normalizing the processed image, the normalized image values can correspond to the range of values of the reference function and the preset stretching inflection point, making it easier to stretch the image.
[0052] Furthermore, the benchmark function includes:
[0053] Obtain the benchmark coefficients and benchmark inflection points;
[0054] The baseline function is obtained by varying the independent variable of the Sigmoid function based on the baseline coefficient and the baseline inflection point.
[0055] As described above, by taking advantage of the relatively fixed form and input / output range of the Sigmoid curve function, and by adding a reference coefficient and a reference inflection point to adjust the Sigmoid curve function, it can be adapted to stretch different images, making it easier to create a reference curve.
[0056] Furthermore, by varying the independent variable of the Sigmoid function based on the benchmark coefficients and benchmark inflection points, the benchmark function is obtained, comprising:
[0057]
[0058] Among them, y sig denoted as gamma parameter output by the baseline function, x is the gray value of the image to be processed, kS is the baseline coefficient, and iP is the baseline inflection point.
[0059] As described above, by varying the baseline coefficient kS and the baseline inflection point iP, the Sigmoid function can be adapted to stretch different images, making it easier to create baseline curves.
[0060] Furthermore, the benchmark function is a linear function of the first order;
[0061] The slope of the linear function is less than zero, and the intercept is less than or equal to 1.
[0062] As described above, by using a linear function as the reference function, not only is the composition of the reference function simplified, but by adjusting the slope and intercept of the linear function, it can be applied to stretch different images, making it easier to create a reference curve.
[0063] Please refer to Figure 8 An image stretching device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the various steps of the image stretching method described above.
[0064] The image stretching method and apparatus described above in this invention can be applied to the field of medical image processing and some general digital image processing, such as the processing of X-ray images in medicine. The following detailed embodiments illustrate this:
[0065] Example 1
[0066] Please refer to Figure 1 An image stretching method includes the following steps:
[0067] S1. Obtain a reference function and a preset stretching inflection point; the reference function is a monotonic function, and the value range of the reference function and the preset stretching inflection point is adapted to the gray value range of the image to be processed; for example, if the gray value range of the image to be processed after normalization is 0-1, then the value range of the reference function and the preset stretching inflection point is 0-1; the preset stretching inflection point is configured according to the boundary between the target area and the background area on the image to be processed.
[0068] S2. Calculate the coordinates of the preset stretching inflection point on the reference function to obtain the coordinates of the preset stretching inflection point;
[0069] S3. Obtain the reference offset based on the difference between the coordinates of the preset stretching inflection point and the gamma reference parameter;
[0070] S4. Using the sum of the reference function and the reference offset as the gamma parameter, the stretching curve is obtained;
[0071] S5. Stretch the image to be processed according to the stretching curve;
[0072] In an optional implementation, the above steps are illustrated based on the Sigmoid curve:
[0073] The image to be processed is preprocessed by normalizing the grayscale values of the image to be processed.
[0074] S1. Obtaining the baseline function and preset stretching inflection point includes:
[0075] Obtain the baseline coefficients and baseline inflection points, and then vary the independent variable of the Sigmoid function based on these coefficients and inflection points to obtain the baseline function:
[0076]
[0077] Among them, y sig Here, gamma is the output parameter of the baseline function, x is the gray value of the image to be processed, kS is the baseline coefficient, and iP is the baseline inflection point; the sign of kS will change the direction of the baseline curve.
[0078] If the reference function is directly used to stretch the image to be processed: for example, in an X-ray image, the reference inflection point iP is set at the boundary between the target area (such as the bone area) and the background area (such as the soft tissue and air area). The concavity and convexity on both sides of the reference inflection point are used to stretch the image in the opposite direction, making the contrast between the target foreground and the background area of the image more obvious and highlighting the main content of the image. On the other hand, even for images without obvious boundary areas, such as abdominal X-ray images and cephalometric X-ray images, the details are poor due to the large number of organs and the thickness of the tissue in the abdomen. The cephalometric images are mainly composed of bones and the gray levels are relatively concentrated. In this case, setting the inflection point near the center of the concentrated gray level range can map this concentrated gray level range to a wider gray level range, making the image more layered and improving the detail of the image. Although the characteristics of the Sigmoid curve meet the stretching requirements of X-ray images well, the Sigmoid curve is too inflexible and has poor parameter adjustment performance, so it cannot be directly used as a stretching curve.
[0079] Please refer to Figure 2 Specifically, taking a normalized image as an example, if the inflection point is set at the center of the grayscale range, then iP = 0.5 is sufficient. However, if the inflection point is set to other values, such as a target inflection point of 0.3, then iP is not equal to 0.3, but rather equal to 0.39. Therefore, it is necessary to calculate the size of iP in conjunction with the linear relationship y = x. This is due to the mapping relationship between the Sigmoid curve offset and the fixed input and output. On the other hand, the mapping relationship between the Sigmoid curve and the image grayscale input and output is not equal. When kS is smaller and iP is too large or too small, the output grayscale range is compressed to a certain extent. For example, the curve corresponding to parameters kS = 10 and iP = 0.39 has its 0-0.3 output compressed to a certain extent. Therefore, this embodiment does not directly use the Sigmoid curve as the stretching curve, but uses the Sigmoid curve as the reference curve, and combines the Gamma transformation to offset the reference curve as a variable gamma parameter.
[0080] S2. Calculate the coordinates of the preset stretching inflection point on the reference function to obtain the coordinates of the preset stretching inflection point; let the preset stretching inflection point be iP. stretch Then its coordinates on the reference function are: (iP) stretch y sig (iP stretch ));
[0081] S3. Obtain the reference offset based on the difference between the coordinates of the preset stretching inflection point and the gamma reference parameter; let the reference offset be V, then:
[0082]
[0083] Where 1 is the gamma reference parameter, that is, the reference function in iP stretch The difference between 1 and 1; since the parameters in formula (2) are all set values, that is, V is a fixed offset;
[0084] S4. Using the sum of the reference function and the reference offset as the gamma parameter, the stretching curve is obtained, i.e.:
[0085]
[0086] Among them, y s is the grayscale value of the stretched image, x is the grayscale value of the image to be processed;
[0087] S5. Stretch the image to be processed according to the stretching curve, that is, stretch the gray value of the image to be processed after normalization through the stretching curve.
[0088] In another optional implementation, the benchmark function is a linear function of the first order; in this case, the parameters corresponding to the benchmark function are the intercept b and the slope k.
[0089] Since the grayscale values of the image are between 0 and 1 after preprocessing, the slope of the linear function is less than zero and the intercept is less than or equal to 1. If b > 1, it means that the reference function has already intersected with y = 1, that is, there is already an inflection point, which will make it impossible to set the preset stretching inflection point. On the other hand, the slope k must also be limited so that the line is y > 0 in the 0-1 interval. That is, the linear function y = k*x + b is more flexible in the defined range than the sigmoid curve, but if the linear function is used as the reference curve, it needs to be limited as much as possible to the vicinity of the function y = -x + 1. After processing the linear function that meets the conditions with the same steps as above, the corresponding stretching curve can be obtained.
[0090] Example 2
[0091] The difference between this embodiment and Embodiment 1 is that the stretching curve is further optimized;
[0092] Please refer to Figure 1 , Figure 3 and Figure 4 Step S4 also includes:
[0093] S41. Obtain a variable offset function by multiplying the offset relationship between the preset stretching inflection point and the grayscale value of the image to be processed with the reference offset.
[0094] Let the variable offset function be t, then:
[0095]
[0096] S42. Using the sum of the variable offset function and the reference function as the gamma parameter, the stretching curve is obtained, i.e.:
[0097]
[0098] The variable offset function t is not directly equal to the reference offset V. Instead, it generates a linearly variable offset relationship based on the reference offset V. Since it is a product relationship, it does not change the preset stretching inflection point iP. stretch The coordinates; since the value of t changes with the grayscale value of the input image, t is a variable offset;
[0099] In one optional implementation, the stretching curve is further optimized:
[0100] S43. Obtain the offset index, and use the offset index as the exponential parameter of the gamma parameter. Let the offset index be p, then the stretching curve is obtained:
[0101]
[0102] By performing an exponential transformation on the offset index p, a nonlinear gain can be applied to the stretching curve, thereby adjusting the curvature of the curve.
[0103] Furthermore, regardless of the offset scheme (variable or fixed offset) or the change in the offset exponent p, the stretching function remains constant in iP. stretch At any given point, t = V, such that the gamma parameter (i.e., (ysig+t)p) formed by the variable offset function and the reference function is at iP. stretch The point always intersects y=1, thus the stretch curve y s Just on iP stretch The point intersects with y = x, and the stretching curve y s In iPhone stretch The concavity and convexity on both sides are opposite, which corresponds to the stretching inflection point; and the generated S-shaped stretching curve y s The curve is completely smooth near the preset stretching inflection point, and the mapping relationship between the input and output value ranges is also completely equal, without compression or overflow. The offset index p is determined according to different image types. For example, for abdominal images or underexposed images, setting p to a larger value will make the curve more curved and the stretching stronger.
[0104] Please refer to Figure 5 With the preset stretching inflection point iP stretchTaking iP=0.4 as an example, different curve stretching effects can be achieved by adjusting different parameters; different parameter settings will affect the final S-shaped stretching curve y. s The shape; where the parameter kS is set between -4 and -6, iP is set to 0.4-0.6, the offset scheme is generally set to variable offset, and p is set to 1-1.8; if kS is greater than 0, 0 < p < 1, and a fixed offset is set, then the generated curve is symmetrical to other S-shaped stretching curves about y = x, that is, an inverse S-shaped curve; this situation occurs at the preset stretching inflection point iP stretch When the value is relatively small, basic X-ray image stretching is not suitable. It essentially boosts low grayscale values and compresses high grayscale values, resulting in compressed grayscale values near the inflection point and poor image contrast. For X-ray images with a clearly defined target area, setting a suitable stretching inflection point (iP) is appropriate. stretch This allows for differentiated stretching, compressing low grayscale, enhancing high grayscale, and improving overall contrast. Under the same parameters (reference curve parameters kS and iP, offset index p), the variable offset produces a stronger stretching curve compared to the fixed offset, as shown in the figure. When differences in image stretching effects occur and adjustments are needed without adjusting multiple parameters, the offset scheme can be directly changed to alter the stretching effect. Alternatively, a fixed offset scheme can be used for images that do not require excessive stretching, while a variable offset scheme can be used for images with stronger stretching requirements. Since there is no clear consistency in kS, the values of the two parameters kS and iP on the reference curve are within a compromise range that meets basic image stretching needs. The stretching degree of the stretching curve is mainly adjusted by selecting the offset scheme and the offset index p.
[0105] Please refer to Figure 6 and Figure 7 The images show the tibia and fibula (unreversed) and abdominal lumbar spine (reversed) images, respectively. After a series of preprocessing operations including detail enhancement and noise reduction, the images are compared with the results of the stretching curve processing in this embodiment and the Gamma transform processing. The left side of the image shows the Gamma transform, and the right side shows the stretching curve in this embodiment. The specific stretching curve parameters are set as follows: kS = -5, iP = 0.5, p = 1.5, variable offset scheme, iP... stretch The values are 0.35 and 0.25 respectively; it can be seen that the image effect after stretching curve processing in this embodiment is significantly better than that after Gamma transformation, with better overall image contrast, more comprehensive detail, and clearer layers.
[0106] Example 3
[0107] The difference between this embodiment and Embodiment 2 is that the variable offset function is further processed;
[0108] Specifically, S43 includes:
[0109] S431. The offset relationship between the preset stretching inflection point and the function's independent variable is subjected to an exponential change to obtain an exponentially changed offset relationship, namely:
[0110]
[0111] Where p1 is the offset weight; increasing the offset weight causes the variable offset function t to change non-linearly, and in iP stretch At that point, t = V, meaning the preset stretching inflection point is still iP. stretch .
[0112] Example 4
[0113] Please refer to Figure 8 An image stretching device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement various steps in an image stretching method as described in any one of Embodiments 1, 2, or 3.
[0114] In summary, the present invention discloses an image stretching method and device. By using a monotonic function as a reference function and obtaining the corresponding coordinates by substituting a preset stretching inflection point into the reference function, the difference between the reference function at the preset stretching inflection point and the gamma reference parameter (i.e., 1) is further calculated to obtain the reference offset. The reference function and the reference offset are then used as the gamma parameter, causing the stretching curve to intersect the function y = x (gamma parameter 1) at the preset stretching inflection point. Since the reference function is monotonic, the gamma parameter value calculated on one side of the stretching curve at the preset stretching inflection point is greater than 1, while the gamma parameter value calculated on the other side is less than 1. This results in the stretching curve forming a convex curve (gamma parameter value less than 1) and a concave curve (gamma parameter value greater than 1) on both sides of the preset stretching inflection point compared to the function y = x. Therefore, when stretching an image using the stretching curve, the concavity and convexity of the stretching curve can be used to perform differentiated stretching near the inflection point, resulting in a more distinct layered X-ray image with more comprehensive detail and improved overall image contrast.
[0115] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. An image stretching method, characterized in that, Including the following steps: Obtain the baseline function and preset stretching inflection point; The reference function is a monotonic function, and the range of values of the reference function and the preset stretching inflection point is adapted to the gray value range of the image to be processed. Calculate the coordinates of the preset stretching inflection point on the reference function to obtain the coordinates of the preset stretching inflection point; The reference offset is obtained based on the difference between the coordinates of the preset stretching inflection point and the gamma reference parameter; The stretching curve is obtained by using the sum of the reference function and the reference offset as the gamma parameter; The image to be processed is stretched according to the stretching curve; The stretch curves include: ; in, Let x be the dependent variable of the function, and let x be the independent variable of the function. t is the base function, t is the base offset or variable offset function, and p is the offset exponent; The reference offset is ,but: ; Wherein, 1 is the gamma reference parameter. The preset stretching inflection point, i.e., the reference function at... The difference between 1 and 0; all parameters in the formula are set values, i.e. Fixed offset; If the variable offset function is t, then: ; The benchmark function includes: ; in, denoted as gamma parameter output by the baseline function, x is the gray value of the image to be processed, kS is the baseline coefficient, and iP is the baseline inflection point.
2. The image stretching method according to claim 1, characterized in that, The process of obtaining the stretching curve by using the sum of the reference function and the reference offset as the gamma parameter includes: The variable offset function is obtained by multiplying the offset relationship between the preset stretching inflection point and the grayscale value of the image to be processed with the reference offset. The sum of the variable offset function and the reference function is used as the gamma parameter to obtain the stretching curve.
3. The image stretching method according to claim 2, characterized in that, The step of obtaining the variable offset function by multiplying the offset relationship between the preset stretching inflection point and the grayscale value of the image to be processed with the reference offset includes: The offset relationship between the preset stretching inflection point and the function's independent variable is subjected to an exponential change to obtain an exponentially changed offset relationship. The variable offset function is obtained by multiplying the exponential change offset relationship with the baseline offset.
4. An image stretching method according to claim 1, 2, or 3, characterized in that, The process before obtaining the stretch curve includes: Obtain the offset index and use it as the exponential parameter of the gamma parameter to obtain the stretching curve.
5. The image stretching method according to claim 1, characterized in that, The stretching of the image to be processed according to the stretching curve includes: The grayscale values of the image to be processed are normalized. The grayscale values of the image to be processed, after normalization, are stretched using the stretching curve.
6. The image stretching method according to claim 5, characterized in that, The benchmark function includes: Obtain the benchmark coefficients and benchmark inflection points; The baseline function is obtained by varying the independent variable of the Sigmoid function based on the baseline coefficient and the baseline inflection point.
7. The image stretching method according to claim 5, characterized in that, The benchmark function is a linear function of the first degree. The slope of the linear function is less than zero, and the intercept is less than or equal to 1.
8. An image stretching device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements each step of the image stretching method as described in any one of claims 1-7.
Citation Information
Patent Citations
Improved Lapras multi-extremum inhibition-based SAR image registration method
CN106373147A
X-ray image stretching method and computer readable storage medium
CN107578374A