Histogram adjustment method and device, medium and equipment

By setting adjustment curves in the histogram generation tool and using boundary constraint algorithm to clamp the coordinates of control points, the problems of insufficient user interaction and boundary excess in existing tools are solved, and histogram adjustment with strong interactivity and high stability is achieved.

CN120491870APending Publication Date: 2025-08-15INSPUR ENTERPRISE CLOUD TECHNOLOGY (SHANDONG) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510538477.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-08-15

AI Technical Summary

Technical Problem

The existing histogram generation tools lack user interaction capabilities and do not limit the drag and drop points, resulting in the damage to the accuracy of data visualization.

Method used

Generate an initial histogram in the coordinate system, set up adjustment curves, clamp the coordinates of the control point through the boundary constraint algorithm to ensure that it does not exceed the boundary of the coordinate system, and then adjust the histogram.

Benefits of technology

User interactive histogram adjustment is realized, ensuring the accuracy and operation accuracy of data visualization, and improving interactivity and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120491870A_ABST
    Figure CN120491870A_ABST
Patent Text Reader

Abstract

The invention provides a histogram adjustment method and device, a medium and equipment. The method comprises the following steps: generating an initial histogram in a coordinate system according to a character string numeric array; setting an adjusting curve in the coordinate system; wherein the adjusting curve comprises a control point; in response to a dragging action of a user on the control point, acquiring a coordinate of the control point in the coordinate system when dragging is completed; adopting a boundary constraint algorithm to clamp the coordinates of the control points, so that the coordinates of the control points do not exceed the boundary of the coordinate system; and adjusting the initial histogram according to the coordinates of the control point after clamping processing to obtain an adjusted histogram. According to the embodiment of the invention, the method supports the interactive adjustment of the curve by a user, and further adjusts the histogram. Moreover, the method can guarantee that the coordinates of the control points do not exceed the boundary of the coordinate system, and guarantees the accuracy of data visualization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a histogram adjustment method, device, medium, and equipment. Background Art

[0002] Most existing histogram generation tools support static chart display and lack user interaction capabilities. Some interactive tools support dragging, but do not impose boundary constraints on the drag points. This can cause users to drag the control points outside the coordinate system, compromising the accuracy of data visualization. Summary of the Invention

[0003] In response to at least one of the above technical problems, embodiments of the present invention provide a histogram adjustment method, apparatus, medium, and device.

[0004] According to a first aspect, an embodiment of the present invention provides a histogram adjustment method including:

[0005] Generate an initial histogram in the coordinate system based on the string numeric array;

[0006] Setting an adjustment curve in the coordinate system; wherein the adjustment curve includes control points;

[0007] In response to a user dragging action on the control point, obtaining coordinates of the control point in the coordinate system when the dragging is completed;

[0008] Clamping the coordinates of the control points using a boundary constraint algorithm so that the coordinates of the control points do not exceed the boundaries of the coordinate system;

[0009] The initial histogram is adjusted according to the coordinates of the control points after clamping to obtain an adjusted histogram.

[0010] In one embodiment, generating an initial histogram in a coordinate system based on a string numerical array includes:

[0011] Mapping each value in the string value array into a first range;

[0012] Setting the boundaries of the coordinate system so that both the abscissa and the ordinate of the coordinate system are mapped to the first range;

[0013] The initial histogram is plotted in the coordinate system.

[0014] In one embodiment, the adjustment curve includes a first point, a second point, a third point and a fourth point, the longitudinal coordinates of the first point and the second point are always the same, the longitudinal coordinates of the third point and the fourth point are always the same, and the second point and the third point are the control points of the adjustment curve; the initial coordinates of the first point are (first value, first value), the coordinates of the fourth point are (second value, second value), the first value is the minimum value of the first range, and the second value is the maximum value of the first range.

[0015] In one embodiment, the control point is bound to a drag event and a cursor event; accordingly, in response to the user dragging action on the control point, obtaining the coordinates of the control point in the coordinate system when the dragging is completed includes:

[0016] When the drag event of the control point is triggered, the screen coordinates of the control point on the display screen at the end of the drag are determined based on the position of the cursor on the display screen at the end of the drag, and the screen coordinates are converted into the coordinates of the control point in the coordinate system.

[0017] In one embodiment, the adopting of a boundary constraint algorithm to clamp the coordinates of the control point so that the coordinates of the control point do not exceed the boundary of the coordinate system includes: adopting a first calculation formula to clamp the coordinates of the control point, wherein the first calculation formula is:

[0018] x clamped1 =max(x min ,min(x,x max ))

[0019] y clamped1 =max(y min ,min(y,y max ))

[0020] Wherein, x is the horizontal coordinate of the control point in the coordinate system when the dragging is completed, y is the vertical coordinate of the control point in the coordinate system when the dragging is completed, and x is the horizontal coordinate of the control point in the coordinate system when the dragging is completed. min is the minimum horizontal coordinate of the first range, y max is the minimum ordinate of the first range, x clamped1 is the horizontal coordinate after the horizontal coordinate x is clamped, y clamped1 The vertical coordinate y is clamped.

[0021] In one embodiment, before adjusting the initial histogram based on the coordinates of the control points after clamping, the method further includes: performing boundary adsorption processing on the coordinates of the control points using a second calculation formula, where the second calculation formula is:

[0022] xclamped2 =x min ,if x clamped1 ∈[x min ,x min +Δ)

[0023] x clamped2 =x max ,if x clamped2 ∈(x max -Δ,x max ]

[0024] y clamped2 =y min ,if y clamped1 ∈[y min ,y min +Δ)

[0025] y clamped2 =y max ,if y clamped1 ∈(y max -Δ,y max ]

[0026] Where Δ is the first threshold, x clamped2 is the horizontal coordinate of the control point after the boundary adsorption process, y clamped2 is the vertical coordinate of the coordinate of the control point after boundary adsorption processing is performed on the coordinate of the control point.

[0027] In one embodiment, before clamping the coordinates of the control points using a boundary constraint algorithm, the method further includes:

[0028] It is determined whether the distance between the coordinates of the control point when the dragging is completed and the coordinates of the control point before the dragging exceeds a second threshold; if so, a boundary constraint algorithm is used to clamp the coordinates of the control point.

[0029] According to a second aspect, an embodiment of the present invention provides a histogram adjustment device comprising:

[0030] The histogram generation module is used to generate an initial histogram in the coordinate system according to the string value array;

[0031] A curve setting module, configured to set an adjustment curve in the coordinate system; wherein the adjustment curve includes control points;

[0032] a coordinate acquisition module, configured to acquire, in response to a user dragging action on the control point, the coordinates of the control point in the coordinate system when the dragging is completed;

[0033] A coordinate clamping module, configured to clamp the coordinates of the control points using a boundary constraint algorithm so that the coordinates of the control points do not exceed the boundaries of the coordinate system;

[0034] The histogram adjustment module is used to adjust the initial histogram according to the coordinates of the control points after clamping to obtain an adjusted histogram.

[0035] According to a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed in a computer, causes the computer to execute the method provided in the first aspect.

[0036] According to a fourth aspect, an embodiment of the present invention provides a computing device, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method provided in the first aspect is implemented.

[0037] The histogram adjustment method, apparatus, medium, and device provided in an embodiment of the present invention first generate an initial histogram, then set an adjustment curve in a coordinate system. When a user drags a control point in the adjustment curve, the coordinates of the control point in the coordinate system are obtained when the dragging is completed, and the coordinates are clamped to ensure that the coordinates of the control point do not exceed the boundaries of the coordinate system. Finally, the histogram is adjusted according to the coordinates of the control point. It can be seen that the embodiment of the present invention supports users to interactively adjust the curve and then adjust the histogram. It can also ensure that the coordinates of the control point do not exceed the boundaries of the coordinate system, ensuring the accuracy of data visualization. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 1 is a flow chart of a histogram adjustment method according to an embodiment of the present invention;

[0039] Figure 2 is a schematic diagram of an initial histogram in one embodiment of the present invention;

[0040] Figure 3 Schematic diagram of an adjustment curve set in the coordinate system where the histogram is located in one embodiment of the present invention.

[0041] Figure 4 FIG. 4 is a structural block diagram of a histogram adjustment device in one embodiment of the present invention. DETAILED DESCRIPTION

[0042] In a first aspect, an embodiment of the present invention provides a histogram adjustment method, see Figure 1 The method includes S110 to S150:

[0043] S110, generating an initial histogram in the coordinate system according to the string numerical array;

[0044] In one embodiment, generating an initial histogram in a coordinate system according to the string numerical array in S110 may include:

[0045] S111, mapping each value in the string value array into a first range;

[0046] S112. Setting the boundary of the coordinate system so that both the horizontal coordinate and the vertical coordinate of the coordinate system are mapped to the first range;

[0047] S113: Draw the initial histogram in the coordinate system.

[0048] As an example, the first range is set to [0, 255], and the string numeric array is [12985.0, 20245.0, 39979.0, 65005.0, 91252.0, ...]. Normalize the string numeric array to [0, 255]. Set the boundaries of the coordinate system. Specifically, set the range of the horizontal axis of the coordinate system to [0, 255] and the range of the vertical axis to [0, 255]. Then, draw the initial histogram in this coordinate system. The obtained initial histogram can be seen in Figure 2 .

[0049] S120, setting an adjustment curve in the coordinate system; wherein the adjustment curve includes control points;

[0050] In one embodiment, the adjustment curve includes a first point, a second point, a third point and a fourth point, the longitudinal coordinates of the first point and the second point are always the same, the longitudinal coordinates of the third point and the fourth point are always the same, and the second point and the third point are the control points of the adjustment curve; the initial coordinates of the first point are (first value, first value), the coordinates of the fourth point are (second value, second value), the first value is the minimum value of the first range, and the second value is the maximum value of the first range.

[0051] See also Figure 3 , the range of the horizontal and vertical coordinates of the coordinate system is [0,255], so the minimum value is 0 and the maximum value is 255. The initial coordinates of the first point are (0,0), the initial coordinates of the second point A are (120,0), the initial coordinates of the third point B are (140,255), and the initial coordinates of the fourth point are (255,255). The second point A and the third point B are control points. The user can drag at least one control point to adjust the initial histogram. For example, by dragging at least one control point, the contrast parameter of the initial histogram can be adjusted. During the dragging process, the vertical coordinates of the first and second points are always the same, and the vertical coordinates of the third and fourth points are always the same. In this way, only the second and third points need to be adjusted to adjust the contrast parameter.

[0052] S130. In response to the user's dragging action on the control point, obtaining the coordinates of the control point in the coordinate system when the dragging is completed;

[0053] Wherein, the control point is bound to a drag event and a cursor event. Based on this, in one embodiment, in response to the user's dragging action on the control point, obtaining the coordinates of the control point in the coordinate system when the dragging is completed in S130 may include:

[0054] When the drag event of the control point is triggered, the screen coordinates of the control point on the display screen at the end of the drag are determined based on the position of the cursor on the display screen at the end of the drag, and the screen coordinates are converted into the coordinates of the control point in the coordinate system.

[0055] By monitoring the drag event, you can know whether the control point is being dragged and whether the dragging is completed. By monitoring the cursor event, you can know whether the cursor moves or stops moving.

[0056] It can be seen that by monitoring the drag event and cursor event of the control point, the position of the cursor on the screen of the electronic device at the end of dragging can be determined, and the position is used as the screen coordinates of the control point on the display screen at the end of dragging. Then, the coordinates of the control point in the coordinate system can be determined based on the screen coordinates.

[0057] S140, clamping the coordinates of the control points using a boundary constraint algorithm so that the coordinates of the control points do not exceed the boundaries of the coordinate system;

[0058] In one embodiment, clamping the coordinates of the control points using a boundary constraint algorithm so that the coordinates of the control points do not exceed the boundaries of the coordinate system may include: clamping the coordinates of the control points using a first calculation formula, wherein the first calculation formula is:

[0059] x clamped1 =max(x min ,min(x,x max ))

[0060] y clamped1 =max(y min ,min(y,y max ))

[0061] Wherein, x is the horizontal coordinate of the control point in the coordinate system when the dragging is completed, y is the vertical coordinate of the control point in the coordinate system when the dragging is completed, and x is the horizontal coordinate of the control point in the coordinate system when the dragging is completed. min is the minimum horizontal coordinate of the first range, y max is the minimum ordinate of the first range, xclamped1 is the horizontal coordinate after the horizontal coordinate x is clamped, y clamped1 The vertical coordinate y is clamped.

[0062] That is, when the abscissa of the control point in the coordinate system obtained in S130 is less than the minimum abscissa in the first range, the abscissa of the control point is adjusted to the minimum abscissa. When the ordinate of the control point in the coordinate system obtained in S130 is less than the minimum ordinate in the first range, the ordinate is adjusted to the minimum ordinate. When the abscissa and ordinate of the control point are within the first range, the abscissa and ordinate remain unchanged.

[0063] It can be seen that the above clamping process can ensure that the coordinates of the control points will not exceed the boundaries.

[0064] Furthermore, in one embodiment, before adjusting the initial histogram based on the coordinates of the control points after clamping, the method may further include: performing boundary adsorption processing on the coordinates of the control points using a second calculation formula, where the second calculation formula is:

[0065] x clamped2 =x min ,if x clamped1 ∈[x min ,x min +Δ)

[0066] x clamped2 =x max ,if x clamped2 ∈(x max -Δ,x max ]

[0067] y clamped2 =y min ,if y clamped1 ∈[y min ,y min +Δ)

[0068] y clamped2 =y max ,if y clamped1 ∈(y max -Δ,y max ]

[0069] Where Δ is the first threshold, x clamped2 is the horizontal coordinate of the control point after the boundary adsorption process, y clamped2 is the vertical coordinate of the coordinate of the control point after boundary adsorption processing is performed on the coordinate of the control point.

[0070] It can be seen that when the control point is close to the boundary of the coordinate system, that is, the distance from the boundary is less than the first threshold Δ, the control point is automatically adsorbed to the boundary, which can improve the operation accuracy.

[0071] In one embodiment, before clamping the coordinates of the control points using a boundary constraint algorithm, the method may further include:

[0072] It is determined whether the distance between the coordinates of the control point when the dragging is completed and the coordinates of the control point before the dragging exceeds a second threshold; if so, a boundary constraint algorithm is used to clamp the coordinates of the control point.

[0073] It can be seen that only when the coordinate change of the control point exceeds the second threshold will the histogram be redrawn to avoid frequent rendering. This can be achieved through the following formula:

[0074] ∣x new -x old ∣>∈

[0075] ∣y new -y old ∣>∈

[0076] Among them, ∈ is the second threshold, (x new ,y new ) is the coordinate of the control point at the end of dragging, (x old ,y old ) are the coordinates of the control point before dragging.

[0077] S150 , adjusting the initial histogram according to the coordinates of the control points after clamping to obtain an adjusted histogram.

[0078] After a series of operations, the coordinates of the control points that meet the requirements are obtained, and then the initial histogram is adjusted according to the coordinates of the control points to obtain an adjusted histogram. For example, the change in the contrast adjustment parameter is determined based on the change in the coordinates of the control points, and the contrast of the histogram is adjusted.

[0079] This embodiment of the present invention implements boundary constraints through a clamping function, making mathematical constraints lightweight while also supporting adsorption effects, improving operational precision and interactivity. Furthermore, it includes built-in out-of-bounds recovery and exception handling to ensure algorithm stability. This demonstrates that this embodiment provides an efficient, highly interactive histogram generation and curve adjustment solution with dynamic boundary constraints.

[0080] In summary, the embodiment of the present invention generates an initial histogram of the frequency distribution by parsing a string numerical array, and superimposes an adjustment curve on the coordinate system, and ensures that the dragged control point is always confined to the coordinate system through a dynamic boundary detection algorithm. The embodiment of the present invention involves string data preprocessing, histogram dynamic rendering, curve control point initialization, drag event monitoring and coordinate correction, real-time graphics update, etc. The embodiment of the present invention solves the problem that traditional histogram tools cannot support users to interactively adjust curves, and are prone to exceeding boundaries. In addition, the automatic adsorption, incremental update and out-of-bounds recovery mechanisms of control points are added, which is interactive and friendly, improves operational performance and ensures algorithm stability. It can be applied in image enhancement, medical image analysis, industrial detection and other fields, and significantly improves interaction efficiency and adjustment accuracy.

[0081] In a second aspect, an embodiment of the present invention provides a histogram adjustment device, see Figure 4 , the apparatus 100 comprises:

[0082] A histogram generating module 110 is used to generate an initial histogram in a coordinate system according to a string value array;

[0083] A curve setting module 120, configured to set an adjustment curve in the coordinate system; wherein the adjustment curve includes control points;

[0084] A coordinate acquisition module 130, configured to acquire the coordinates of the control point in the coordinate system when the dragging is completed in response to the user's dragging action on the control point;

[0085] A coordinate clamping module 140 is configured to clamp the coordinates of the control points using a boundary constraint algorithm so that the coordinates of the control points do not exceed the boundaries of the coordinate system;

[0086] The histogram adjustment module 150 is configured to adjust the initial histogram according to the coordinates of the control points after the clamping process to obtain an adjusted histogram.

[0087] In one embodiment, the histogram generation module is specifically used to: map each value in the string numerical array into a first range; set the boundary of the coordinate system so that the horizontal coordinate and the vertical coordinate of the coordinate system are both mapped to the first range; and draw the initial histogram in the coordinate system.

[0088] In one embodiment, the adjustment curve includes a first point, a second point, a third point and a fourth point, the longitudinal coordinates of the first point and the second point are always the same, the longitudinal coordinates of the third point and the fourth point are always the same, and the second point and the third point are the control points of the adjustment curve; the initial coordinates of the first point are (first value, first value), the coordinates of the fourth point are (second value, second value), the first value is the minimum value of the first range, and the second value is the maximum value of the first range.

[0089] In one embodiment, the control point is bound to a drag event and a cursor event; correspondingly, the coordinate acquisition module is specifically used to: when monitoring the drag event of the control point being triggered, determine the screen coordinates of the control point on the display screen at the end of the dragging based on the position of the cursor on the display screen at the end of the dragging, and convert the screen coordinates into the coordinates of the control point in the coordinate system.

[0090] In one embodiment, the coordinate clamping module is specifically configured to: clamp the coordinates of the control point using a first calculation formula, wherein the first calculation formula is:

[0091] x clamped1 =max(x min ,min(x,x max ))

[0092] y clamped1 =max(y min ,min(y,y max ))

[0093] Wherein, x is the horizontal coordinate of the control point in the coordinate system when the dragging is completed, y is the vertical coordinate of the control point in the coordinate system when the dragging is completed, and x is the horizontal coordinate of the control point in the coordinate system when the dragging is completed. min is the minimum horizontal coordinate of the first range, y max is the minimum ordinate of the first range, x clamped1 is the horizontal coordinate after the horizontal coordinate x is clamped, y clamped1 The vertical coordinate y is clamped.

[0094] In one embodiment, the coordinate clamping module is further configured to perform boundary adsorption processing on the coordinates of the control points using a second calculation formula before adjusting the initial histogram according to the coordinates of the control points after the clamping process. The second calculation formula is:

[0095] x clamped2 =x min ,if x clamped1 ∈[x min ,x min +Δ)

[0096] x clamped2 =x max ,if x clamped2 ∈(x max -Δ,x max ]

[0097] y clamped2 =y min ,if y clamped1 ∈[y min ,y min +Δ)

[0098] y clamped2 =y max ,if y clamped1 ∈(y max -Δ,y max ]

[0099] Where Δ is the first threshold, x clamped2 is the horizontal coordinate of the control point after the boundary adsorption process, y clamped2 is the vertical coordinate of the coordinate of the control point after boundary adsorption processing is performed on the coordinate of the control point.

[0100] In one embodiment, before the coordinate clamping module adopts the boundary constraint algorithm to clamp the coordinates of the control point, it is also used to: determine whether the distance between the coordinates of the control point when the dragging is completed and the coordinates of the control point before the dragging exceeds a second threshold; if so, adopt the boundary constraint algorithm to clamp the coordinates of the control point.

[0101] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the device provided by the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0102] In a third aspect, an embodiment of the present invention provides a computer-readable medium having computer instructions stored thereon. When the computer instructions are executed by a processor, the processor executes the method provided in the first aspect.

[0103] Specifically, a system or device equipped with a storage medium can be provided, on which software program codes that implement the functions of any of the above-mentioned embodiments are stored, and a computer (or CPU or MPU) of the system or device can be enabled to read and execute the program codes stored in the storage medium.

[0104] In this case, the program code itself read from the storage medium can realize the function of any one of the above-mentioned embodiments, and thus the program code and the storage medium storing the program code constitute part of the present invention.

[0105] Examples of storage media for providing program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, the program code can be downloaded from a server computer via a communication network.

[0106] In addition, it should be clear that the functions of any of the above embodiments can be achieved not only by executing the program code read by the computer, but also by enabling the operating system operating on the computer to complete part or all of the actual operations based on the instructions of the program code.

[0107] In addition, it can be understood that the program code read from the storage medium is written into a memory provided in an expansion board inserted into the computer or into a memory provided in an expansion module connected to the computer, and then based on the instructions of the program code, a CPU installed on the expansion board or expansion module is enabled to perform part or all of the actual operations, thereby realizing the functions of any of the above embodiments.

[0108] It is understandable that the explanation, specific implementation methods, beneficial effects, examples, etc. of the relevant contents in the computer-readable medium provided in the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0109] In a fourth aspect, an embodiment of this specification provides a computing device, comprising a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, it implements the method in any one of the embodiments in the specification.

[0110] It is understandable that the explanation, specific implementation, beneficial effects, examples, etc. of the relevant contents in the computing device provided by the embodiment of the present invention can be found in the corresponding parts of the method provided in the first aspect, and will not be repeated here.

[0111] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences from other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

[0112] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the present invention may be implemented using hardware, software, widgets, or any combination thereof. When implemented using software, these functions may be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium.

[0113] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. A histogram adjustment method, characterized in that: include: Generate an initial histogram in the coordinate system based on the string numeric array; Setting an adjustment curve in the coordinate system; wherein the adjustment curve includes control points; In response to a user dragging action on the control point, obtaining coordinates of the control point in the coordinate system when the dragging is completed; Clamping the coordinates of the control points using a boundary constraint algorithm so that the coordinates of the control points do not exceed the boundaries of the coordinate system; The initial histogram is adjusted according to the coordinates of the control points after clamping to obtain an adjusted histogram.

2. The method according to claim 1, characterized in that The initial histogram is generated in the coordinate system according to the string numerical array, including: Mapping each value in the string value array into a first range; Setting the boundaries of the coordinate system so that both the abscissa and the ordinate of the coordinate system are mapped to the first range; The initial histogram is plotted in the coordinate system.

3. The method according to claim 2, characterized in that The adjustment curve includes a first point, a second point, a third point and a fourth point. The longitudinal coordinates of the first point and the second point are always the same, the longitudinal coordinates of the third point and the fourth point are always the same, and the second point and the third point are the control points of the adjustment curve; the initial coordinates of the first point are (first value, first value), the coordinates of the fourth point are (second value, second value), the first value is the minimum value of the first range, and the second value is the maximum value of the first range.

4. The method according to claim 3, characterized in that The control point is bound to a drag event and a cursor event; correspondingly, in response to the user's dragging action on the control point, obtaining the coordinates of the control point in the coordinate system when the dragging is completed includes: When the drag event of the control point is triggered, the screen coordinates of the control point on the display screen at the end of the drag are determined based on the position of the cursor on the display screen at the end of the drag, and the screen coordinates are converted into the coordinates of the control point in the coordinate system.

5. The method according to claim 1, wherein The step of clamping the coordinates of the control points using a boundary constraint algorithm so that the coordinates of the control points do not exceed the boundary of the coordinate system includes: clamping the coordinates of the control points using a first calculation formula, wherein the first calculation formula is: x clamped1 =max(x min ,min(x,x max )) and clamped1 =max(y min ,min(y,y max )) Wherein, x is the horizontal coordinate of the control point in the coordinate system when the dragging is completed, y is the vertical coordinate of the control point in the coordinate system when the dragging is completed, and x is the horizontal coordinate of the control point in the coordinate system when the dragging is completed. min is the minimum horizontal coordinate of the first range, y max is the minimum ordinate of the first range, x clamped1 is the horizontal coordinate after the horizontal coordinate x is clamped, y clamped1 The vertical coordinate y is clamped.

6. The method according to claim 5, characterized in that Before adjusting the initial histogram according to the coordinates of the control points after the clamping process, the method further includes: performing boundary adsorption processing on the coordinates of the control points using a second calculation formula, where the second calculation formula is: x clamped2 =x min ,if x clamped1 ∈[x min ,x min +Δ) x clamped2 =x max ,if x clamped2 ∈(x max -Δ,x max ] y clamped2 =y min ,if y clamped1 ∈[y min ,y min +Δ) y clamped2 =y max ,if y clamped1 ∈(y max -Δ,y max ] Where Δ is the first threshold, x clamped2 is the horizontal coordinate of the control point after the boundary adsorption process, y clamped2 is the vertical coordinate of the coordinate of the control point after boundary adsorption processing is performed on the coordinate of the control point.

7. The method according to claim 1, characterized in that Before clamping the coordinates of the control points using the boundary constraint algorithm, the method further includes: It is determined whether the distance between the coordinates of the control point when the dragging is completed and the coordinates of the control point before the dragging exceeds a second threshold; if so, a boundary constraint algorithm is used to clamp the coordinates of the control point.

8. A histogram adjustment device, characterized in that: include: The histogram generation module is used to generate an initial histogram in the coordinate system according to the string value array; A curve setting module, configured to set an adjustment curve in the coordinate system; wherein the adjustment curve includes control points; a coordinate acquisition module, configured to acquire, in response to a user dragging action on the control point, the coordinates of the control point in the coordinate system when the dragging is completed; A coordinate clamping module, configured to clamp the coordinates of the control points using a boundary constraint algorithm so that the coordinates of the control points do not exceed the boundaries of the coordinate system; The histogram adjustment module is used to adjust the initial histogram according to the coordinates of the control points after clamping to obtain an adjusted histogram.

9. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed in a computer, the computer is caused to execute the method according to any one of claims 1 to 7.

10. A computing device, characterized in that The method comprises a memory and a processor, wherein the memory stores executable code, and when the processor executes the executable code, the method according to any one of claims 1 to 7 is implemented.