Picture processing equipment control method, picture processing equipment and storage medium

By employing a dual-layer display mode and intelligent adjustment of drawing layer parameters in image processing devices, the problem of low editing efficiency in traditional image processing devices is solved, achieving accurate matching and efficient processing of the edited content with the original content.

CN120832059APending Publication Date: 2025-10-24SHENZHEN DONSON CLOUD TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510810740.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-17
Publication Date
2025-10-24

AI Technical Summary

Technical Problem

Existing image processing devices make it difficult to simultaneously observe the superimposed effect of the original content and the operation result during the editing process, resulting in low editing efficiency. Traditional single-layer editing mode has low resource consumption but is not intuitive to operate, while multi-layer superimposed mode results in redundant content displayed on the interface and difficulty in precise alignment.

Method used

It adopts a dual-layer display mode, with the drawing layer transparently displayed on top of the presentation layer. The view display parameters of the drawing layer and the presentation layer are updated in real time. The brush size and scaling are automatically adjusted through touch point operations. The drawing layer is decomposed into static and dynamic layers to optimize rendering. Wavelet transform is used to enhance edge processing and ensure that the edited content matches the original content accurately.

Benefits of technology

By minimizing visual distractions, the edited content is precisely matched with the original content, improving the efficiency and smoothness of image processing while reducing resource waste and operational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120832059A_ABST
    Figure CN120832059A_ABST
Patent Text Reader

Abstract

The invention discloses a control method of picture processing equipment, the picture processing equipment and a storage medium, and relates to the technical field of data processing. According to the method, in response to a picture processing process triggering instruction, a to-be-processed picture is displayed on a display layer and a drawing layer at the same time, the to-be-processed picture is transparently displayed in the drawing layer, and the drawing layer is displayed on the display layer in an overlapped mode; and in response to the control operation received by the drawing layer, updating the view display parameters corresponding to the drawing layer. According to the method, the content of the drawing layer is subjected to semitransparent display, and after the drawing layer receives the operation, the view display parameters of the drawing layer and the display layer are updated in real time, so that the effects of ensuring accurate matching of the edited content and the original content and improving the picture processing efficiency under the condition of reducing visual interference are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the specific technical field, and particularly to a picture processing device control method, a picture processing device and a storage medium. BACKGROUND

[0002] In the field of image processing, the balance between the precision of editing operation and the intuitiveness of operation has been in conflict for a long time. Although the single-layer editing mode of directly performing all operations on the original layer has low resource occupation, the user cannot observe the superimposed effect of the original content and the operation result at the same time during the editing process, and needs to verify the precision through the step-by-step process of "preview-confirmation". Although the multi-layer superimposition mode of creating independent layers to store each operation can process each layer parameter more meticulously, the multi-layer superimposition leads to redundant interface display content, and the user needs to frequently switch layers for editing, which is difficult to accurately align the edited content and the original features through a single view. Therefore, the picture processing efficiency is low under the current editing mode.

[0003] The above content is only used to assist in understanding the technical solutions of the present application and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0004] The main purpose of the present application is to provide a picture processing device control method, a picture processing device and a storage medium, aiming to solve the technical problem of how to improve the picture processing efficiency.

[0005] To achieve the above-mentioned purpose, the present application provides a picture processing device control method, which comprises: In response to a picture processing process trigger instruction, simultaneously display a to-be-processed picture on a display layer and a drawing layer, wherein the to-be-processed picture is transparently displayed in the drawing layer, and the drawing layer is overlaid and displayed on the display layer. In response to a control operation received by the drawing layer, update the view display parameters corresponding to the drawing layer and the display layer.

[0006] In an embodiment, the view display parameters include a zoom parameter, and the step of updating the view display parameters corresponding to the drawing layer and the display layer in response to the control operation received by the drawing layer comprises: When the number of touch points on the screen received by the drawing layer is 2, determine the relative distance of the two touch points. If the change speed of the relative distance of the two touch points within a preset time is greater than a preset change threshold, update the zoom parameter according to the relative distance of the two touch points.

[0007] In an embodiment, after the step of updating the zoom parameter according to the relative distance of the two touch points, the method further comprises: obtaining a custom size value of the brush, and determining a brush size in the drawing layer according to a ratio of the custom size value to the zoom parameter.

[0008] In an embodiment, after the step of determining the brush size in the drawing layer according to the ratio of the custom size value to the zoom parameter, the method further comprises: obtaining a moving track of the touch point when the number of the touch points received by the drawing layer is 1; displaying the moving track in the drawing layer according to the moving track and the brush size.

[0009] In an embodiment, the drawing layer further comprises a static drawing layer and a dynamic drawing layer, and the step of displaying the moving track in the drawing layer according to the moving track and the brush size comprises: displaying the moving track in the dynamic drawing layer according to the moving track and the brush size; superimposing the moving track in the dynamic drawing layer to the static drawing layer when the number of the touch points received by the dynamic drawing layer is 0; clearing data of the dynamic drawing layer.

[0010] In an embodiment, before the step of displaying the moving track in the dynamic drawing layer according to the moving track and the brush size, the method further comprises: determining a change rate of an included angle formed by three continuous touch point coordinates in the moving track; determining a ratio of a Euclidean distance between adjacent touch point coordinates to a time interval in the three touch point coordinates, to obtain a moving speed of the touch points; if the change rate of the included angle formed by the three touch point coordinates is greater than a preset change rate, and the moving speed of the touch points is greater than a preset speed threshold, then smoothing the three touch point coordinates to obtain a new moving track.

[0011] In an embodiment, the view display parameter further comprises an offset parameter, and after the step of determining the relative distance of the two touch points when the number of the touch points received by the drawing layer is 2, the method further comprises: if the relative distance of the two touch points is unchanged, then updating the offset parameter according to an offset amount of the touch points, the offset parameter comprising a horizontal offset amount and a vertical offset amount; updating and displaying the to-be-processed picture in the display layer and the drawing layer simultaneously according to the updated view display parameter.

[0012] In an embodiment, the step of updating and displaying the to-be-processed picture on the display layer and the drawing layer according to the updated view display parameter comprises: performing discrete wavelet transform on the to-be-processed picture to obtain detail coefficients and approximation coefficients corresponding to the to-be-processed picture; classifying edge strength of the to-be-processed picture according to the detail coefficients of the to-be-processed picture to obtain an edge mask of the to-be-processed picture; after updating the view display parameter, determining an enhancement coefficient of the edge mask according to the scaling parameter, and determining an enhanced mask according to the enhancement coefficient and the edge mask; performing inverse discrete wavelet transform on the to-be-processed picture according to the enhanced mask and the approximation coefficients to obtain an enhanced to-be-processed picture, and updating and displaying the enhanced to-be-processed picture on the drawing layer and the display layer.

[0013] In addition, to achieve the above-mentioned purposes, the present application also provides a picture processing device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the control method of the picture processing device.

[0014] In addition, to achieve the above-mentioned purposes, the present application also provides a storage medium, which is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the control method of the picture processing device.

[0015] The present application provides a control method of a picture processing device, which displays a to-be-processed picture on a display layer and a drawing layer in response to a picture processing process trigger instruction, wherein the to-be-processed picture is transparently displayed in the drawing layer, and the drawing layer is overlaid and displayed on the display layer; and the view display parameter corresponding to the drawing layer is updated in response to a control operation received by the drawing layer. The method makes the content of the drawing layer semi-transparently displayed, and updates the view display parameters of the drawing layer and the display layer in real time after the drawing layer receives the control operation, thereby ensuring accurate matching between the edited content and the original content and improving the picture processing efficiency under the condition of reducing visual interference. BRIEF DESCRIPTION OF DRAWINGS

[0016] The accompanying drawings, which are incorporated herein and form part of the specification, illustrate embodiments consistent with the present application and, together with the description, further serve to explain the principles of the application.

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced. Obviously, for those skilled in the art, the other drawings can be obtained based on these drawings without any creative work.

[0018] Figure 1 The flowchart provided for the control method of the picture processing device in Embodiment One of the present application; Figure 2 The flowchart provided for the control method of the picture processing device in Embodiment Two of the present application; Figure 3 The flowchart provided for the control method of the picture processing device in Embodiment Three of the present application; Figure 4 The device structure diagram of the hardware running environment involved in the control method of the picture processing device in the embodiments of the present application.

[0019] The object realization, functional features and advantages of the present application will be further explained with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION

[0020] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application, and are not used to limit the present application.

[0021] In order to better understand the technical solutions of the present application, the following will be described in detail with reference to the accompanying drawings and specific embodiments.

[0022] In the field of image processing, the balance between the precision of editing operation and the intuitiveness of operation has been a long-standing contradiction. Although the single-layer editing mode of traditional direct execution of all operations on the original layer has low resource occupation, the user cannot observe the superimposed effect of the original content and the operation result at the same time during the editing process, and needs to verify the precision through the step-by-step process of "preview-confirmation". While the multi-layer superimposition mode of creating independent layers to store each operation can process each layer parameter more meticulously, the multi-layer superimposition leads to redundant display content of the interface, and frequent switching of layers is needed for editing, which is difficult to precisely align the edited content and the original features through a single view. Therefore, the picture processing efficiency is low under the current editing mode.

[0023] In view of the above problems, the present application provides a control method of a picture processing device, in response to a picture processing process trigger instruction, simultaneously displaying a to-be-processed picture on a display layer and a drawing layer, wherein the to-be-processed picture is transparently displayed in the drawing layer, and the drawing layer is overlaid on the display layer; in response to a control operation received by the drawing layer, updating a view display parameter corresponding to the drawing layer. The method makes the content of the drawing layer semi-transparently displayed, and updates the view display parameters of the drawing layer and the display layer in real time after the drawing layer receives the control operation, thereby ensuring accurate matching of the edited content and the original content and improving the picture processing efficiency while reducing visual interference.

[0024] It should be noted that the execution subject of the present embodiment can be a computing service device having data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions. The present embodiment and the following embodiments will be described below by taking a picture processing device as an example.

[0025] Based on this, the first embodiment of the present application provides a control method of a picture processing device, with reference to Figure 1 In the present embodiment, the control method of the picture processing device comprises steps S10-S20: Step S10, in response to a picture processing process trigger instruction, simultaneously displaying a to-be-processed picture on a display layer and a drawing layer, wherein the to-be-processed picture is transparently displayed in the drawing layer, and the drawing layer is overlaid on the display layer.

[0026] It should be noted that the drawing layer is a transparent layer for the user to perform drawing operations, and is used to record all drawing behaviors, such as HTML5 Canvas or OpenGL context. The drawing layer can respond to user inputs such as touch or brush operations, render the drawing track in real time, and can be transparently displayed by adjusting the Alpha channel value of the transparency setting. The display layer is used to display the original content of the to-be-processed picture, and provides a reference benchmark for the drawing layer as a background layer.

[0027] Exemplarily, when the user triggers a picture processing process such as double-clicking a file or clicking an "open" button, an exhibition instruction is sent to a graphics engine such as a V8 engine of Chrome or a SurfaceFlinger of Android through an inter-process communication mechanism, and the exhibition instruction contains an image path, an initial scaling ratio, a transparency parameter, etc. The graphics engine parses the exhibition instruction to extract image data pointers such as "void* image_buffer", three-dimensional coordinate Z values of the display layer and the drawing layer, etc., wherein the three-dimensional coordinate Z value of the drawing layer is higher than that of the display layer. Then, an image decoder of the picture processing device decodes the picture file into bitmap data and renders it on the display layer and the drawing layer.

[0028] Optionally, the display layer can be kept at a low resolution to improve rendering speed, and the drawing layer records user operations at a high resolution. By constructing a double-layer rendering structure, the user operation area can be decoupled from the original picture display, avoiding direct modification of the original picture data.

[0029] Step S20, in response to the control operation received by the drawing layer, updating the view display parameters corresponding to the drawing layer and the display layer.

[0030] It should be noted that the control operation refers to a series of interactive actions performed by input devices such as touchscreens, mice, styluses, etc. on the drawing layer. These operations allow users to modify the content or view of the drawing layer, such as drawing pen touches, erasing areas, etc. to directly change the image content on the drawing layer, or through panning, scaling, rotating, etc. to change the display method of the drawing layer on the screen. The view display parameter refers to a series of parameters that control the display method of the drawing layer on the screen, which can include scaling parameters, offset parameters, rotation directions, etc.

[0031] Optionally, step S20 includes steps S21-S22: Step S21, when the number of touch points on the screen received by the drawing layer is 2, determining the relative distance of the two touch points.

[0032] Illustratively, the canvas drawing layer detects the user TOUCH_MOVE event, which contains the coordinates and timestamps of all touch points. The number of touch points detected in the TOUCH_MOVE event is determined, and if the number of touch points is 2, the relative distance of the two touch points is calculated based on their coordinates. Illustratively, first calculate the horizontal distance dx = touch1.x - touch2.x, where touch1.x represents the X-axis coordinate of the first touch point, and touch2.x represents the X-axis coordinate of the second touch point. Then calculate the vertical distance dy = touch1.y - touch2.y, where touch1.y represents the Y-axis coordinate of the first touch point, and touch2.y represents the Y-axis coordinate of the second touch point. Then, determine the relative distance D = sqrt(dx^2 + dy^2) of the two touch points. .

[0033] Optionally, when the drawing layer detects two touch points, the picture processing device stores the relative distance of the two touch points corresponding to each timestamp in the history buffer area for subsequent calculation.

[0034] Step S22, if the change speed of the relative distance of the two touch points within a predetermined time is greater than a predetermined change threshold, updating the scaling parameter according to the relative distance of the two touch points.

[0035] It can be understood that the user may cause the drawing layer to detect 2 touch points due to a false touch during drawing. Therefore, the speed threshold can be used to filter meaningless small movements, reduce false positives, and avoid false touch to start adjusting the drawing line width.

[0036] Exemplarily, the relative distance of the two touch points corresponding to each timestamp is taken out from the history buffer. The change speed V of the relative distance is calculated according to the relative distance at the initial moment and the relative distance at the end moment. . Wherein, is the relative distance at the end moment corresponding to the initial moment, is the relative distance at the end moment corresponding to the initial moment.

[0037] If the calculated change speed of the relative distance is greater than a preset change threshold, the scaling parameter calculation is triggered. Exemplarily, the scaling parameter scale= , which represents the scaling ratio of the current view relative to the original size. For example, scale=1.4 means that the view is enlarged by 1.4 times.

[0038] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as the above embodiment one can be referred to the above introduction, and will not be described in detail. On this basis, referring to Figure 2 , after step S22, step S23 is further included: Step S23, obtaining a custom size value of the brush, determining the brush size in the drawing layer according to the ratio of the custom size value to the scaling parameter.

[0039] It can be understood that the traditional picture processing device usually designs the scaling function and the marking function as independent operation modes, and the user needs to frequently manually switch between the picture scaling operation and the picture marking operation, which affects the picture editing efficiency.

[0040] In the above steps, the brush size in the drawing layer can be automatically adjusted according to the scaling parameter. Exemplarily, in response to the adjustment operation of the brush adjustment control in the brush operation area, the custom size value of the brush is obtained, and the brush size width=f (width / scale) is determined again according to the ratio of the custom size value to the scaling parameter. Wherein, f is a proportional parameter.

[0041] Optionally, the brush operation area is an area in the user interaction interface for adjusting the brush attribute, such as a side bar or a floating tool bar. In the brush operation area, the user can customize the size of the brush through intuitive controls such as a slider, a gesture, or manually input a custom size value after clicking an adjustment control. The picture processing device records the custom size value as a reference for subsequent dynamic adjustment.

[0042] For example, when the brush operation area of the picture processing device detects the adjustment operation of the user, such as the user dragging the slider from position 50 to 70, the picture processing device converts the control position into a pixel value through a predefined formula, for example: width0=base_width (control_position / max_position). Wherein, width0 represents the custom size value of the brush, base_width is the minimum value of the brush preset by the picture processing device, control_position represents the current position value of the user adjusting the control, reflecting the user's adjustment intention of the brush size. The larger the position value is, the thicker the user wants the brush to be. If the control is a slider ranging from 0 to 100, control_position=70 indicates that the slider is at 70% position. max_position represents the maximum position value of the control, which determines the adjustable range of the control, and is used to convert the relative position of the control into a proportional value, ensuring that the adjustment of the brush size is within a reasonable range. If base_width=10px and the proportion is 0.7, the brush size is 10px*0.7=7px, and the calculated brush size is applied to the drawing layer.

[0043] It can be understood that when the user zooms in the picture, it means that the user wants to paint the picture more finely and mark the picture locally, at which time the brush is adaptively reduced. Similarly, when the user zooms out the picture, it means that the user wants to paint a larger area on the picture, at which time the brush is adaptively increased. Through the above steps, the number of times of manually switching the drawing mode and adjusting the drawing line can be reduced, and the picture editing fluency can be improved.

[0044] Optionally, in order to avoid the brush size being too large or too small due to the adjustment of the zoom parameter, the boundary of the change of the brush size can be set, such as setting the brush size to be not less than a minimum value such as 10px and not greater than a maximum value such as 90px.

[0045] Based on the above embodiments of the present application, in the third embodiment of the present application, the same or similar contents as the above embodiments can be referred to the above introduction, and the following will not be repeated. On this basis, referring to Figure 3 , after step S23, further comprising steps S24-S25: Step S24, when the drawing layer detects that the number of touch points on the screen is 1, the moving track of the touch point is obtained.

[0046] Exemplarily, when the user slides a single finger on the screen, the touch point coordinates are continuously collected to obtain a moving track of the touch point. Then the continuously collected touch point coordinates are connected into a smooth path such as a Bezier curve, and the moving track is rendered according to the continuously collected touch point coordinates on the drawing layer.

[0047] In step S25, the moving track is displayed on the drawing layer according to the moving track and the brush size.

[0048] Optionally, the drawing layer further comprises a static drawing layer and a dynamic drawing layer, and step S25 comprises steps S251-S253. In step S251, the moving track is displayed on the dynamic drawing layer according to the moving track and the brush size. It can be understood that, in the case of limited hardware resources of a mobile terminal, real-time rendering of Canvas may cause frame rate to drop and cause a lag phenomenon when processing a large-size image or frequent zooming. In order to ensure image marking fluency, the drawing layer is decomposed into a static drawing layer and a dynamic drawing layer. The static drawing layer is used to store drawn content, and the dynamic drawing layer is used to respond to real-time rendering of current drawn content. When the user slides a single finger on the screen, the dynamic drawing layer responds to a touch event to complete a drawing operation, and the drawn content is merged into the static drawing layer after the drawing operation.

[0049] Exemplarily, the entire drawing process is split into two independent canvas layers, a background thread is established to process static drawn content in the static drawing layer, so as to reduce the pressure on the main thread to render the dynamic drawing layer. The static drawing layer can transfer control to the background thread through a Web Worker, so as to avoid direct operation of the main thread. When the user touches the screen, the dynamic drawing layer immediately responds to render a moving track of a touch point according to continuously collected touch point coordinates.

[0050] In step S252, when the dynamic drawing layer detects that the number of touch points on the screen is 0, the moving track in the dynamic drawing layer is superimposed on the static drawing layer. In step S253, data of the dynamic drawing layer is cleared.

[0051] When the touch ends, the dynamic drawing layer converts current drawn content into picture data, sends the picture data to the background thread for processing, the background thread receives newly drawn picture data, and superimposes the picture data on existing content of the static drawing layer. Then, the main thread clears the dynamic drawing layer to prepare for the next interaction.

[0052] Through the above steps, the main thread can focus on interaction response, and the rendering task is given to the background thread to avoid mutual blocking. Moreover, the dynamic drawing layer only processes new handwriting each time, and does not need to redraw historical content in full amount, so that the rendering speed can be improved and the picture editing efficiency can be improved.

[0053] Based on the above embodiments of the present application, in the fourth embodiment of the present application, the same or similar contents as the above embodiments can be referred to the above description, and the subsequent will not be described. On this basis, before step S251, it further includes steps S254-S256: Step S254, determining the rate of change of the angle formed by the three continuous touch point coordinates in the movement trajectory.

[0054] It can be understood that when the user draws on the picture processing device by finger or mouse, some irregular small amplitude jitter in a short time may occur. Therefore, when the drawing layer detects the coordinates of the touch point through the TOUCH_MOVE event, the moving direction of the touch point can be judged according to the coordinates, and if the moving direction of the touch point frequently changes, it is determined as jitter.

[0055] Exemplarily, according to the three continuous touch point coordinates in the movement trajectory , , The vector is constructed as: = , = . Then the angle between the two vectors is calculated: . Then, the rate of change of the angle .

[0056] Step S255, determining the ratio of the Euclidean distance between the adjacent touch point coordinates in the three touch point coordinates and the time interval, to obtain the moving speed of the touch point.

[0057] Step S256, if the rate of change of the angle formed by the three touch point coordinates is greater than the preset rate of change, and the moving speed of the touch point is greater than the preset speed threshold, the three touch point coordinates are smoothed to obtain a new movement trajectory.

[0058] When the rate of change of the angle formed by the three touch point coordinates is greater than the preset rate of change, and the ratio of the Euclidean distance between the adjacent touch point coordinates and the time interval is greater than the preset threshold, it is judged that the movement trajectory of the touch point is irregular jitter. At this time, the jitter trajectory is smoothed, in order to ensure the real-time performance of the rendering of the drawing line, a simple moving average or exponential smoothing algorithm can be used for smoothing.

[0059] Exemplarily, assuming that the exponential smoothing algorithm is used to smooth the three touch point coordinates, the smoothing coefficient is calculated first:

[0060] Among them, is a preset initial smoothing coefficient, v represents the moving speed of the touch point, is a preset speed threshold value, is a preset angle maximum value. Then, the touch coordinate points are smoothed according to the smoothing coefficient to obtain a new moving track: . represents the i-th smoothed touch point coordinate, represents the i-1-th smoothed touch point coordinate.

[0061] Based on the above embodiments of the present application, in the fifth embodiment of the present application, the same or similar contents as the above embodiments can be referred to the above description, and the subsequent will not be described in detail. On this basis, after step S21, it further includes steps S26-S27: Step S26, if the relative distance of the two touch points is unchanged, the offset parameter is updated according to the offset amount of the touch point, and the offset parameter includes horizontal offset and vertical offset.

[0062] Optionally, if the relative distance of the two touch points is unchanged, it indicates that the user wants to perform a translation operation on the picture, at this time, the physical movement of the two touch points on the screen is mapped into the horizontal offset and vertical offset in the view display parameter to drive the drawing layer and the display layer to move synchronously.

[0063] Exemplarily, any one of the two touch points is selected to calculate the offset. Assuming that the touch point touch1 is selected, the coordinates of the touch point touch1 corresponding to each timestamp are taken out from the history cache area, and the offset of the touch point touch1 in the horizontal direction and the offset of the touch point touch1 in the vertical direction are calculated according to the coordinates at the initial moment and the coordinates at the end moment. The offset of the touch point touch1 in the horizontal direction is added to the horizontal offset in the view display parameter, and the offset of the touch point touch1 in the vertical direction is added to the vertical offset in the view display parameter.

[0064] Step S27, according to the updated view display parameter, the display of the to-be-processed picture is updated on the display layer and the drawing layer at the same time.

[0065] It can be understood that in the image processing process, the user often adjusts the view through the scaling operation to finely mark the details. However, the view parameters of the drawing layer and the display layer of the traditional image processing device may not be completely synchronized, resulting in that the lines or regions marked by the user deviate from the expected position after scaling. Therefore, in the present embodiment, the rendering of the drawing layer and the display layer is driven synchronously through the view display parameter, which can ensure that the user operation and the visual feedback are strictly consistent, and the marking distortion is avoided.

[0066] Optionally, when the drawing layer and the display layer are initially loaded, the value of the scaling parameter can be 1 indicating that no scaling is performed, and the horizontal offset and the vertical offset are 0.

[0067] Optionally, the image area range of the current screen display is determined according to the view display parameter. When the zoom parameter is greater than a first preset threshold, the resolution of the image area range in the display layer is increased. When the zoom parameter is less than a second preset threshold, the resolution of the image area range in the display layer is decreased.

[0068] Illustratively, the zoom parameter, the horizontal offset and the vertical offset of the current view are read from the view display parameter, and the physical size of the screen is obtained. The screen coordinates are converted into the original image coordinates to determine the image area range of the current screen display.

[0069] Illustratively, it is assumed that the zoom parameter of the current view read from the view display parameter is 1.5, the horizontal offset is -100, which means moving 100 pixels to the right, and the vertical offset is -50, which means moving 50 pixels downward. It is assumed that the physical size of the screen is 1080 pixels in width and 1920 pixels in height. The screen coordinate system is constructed with the upper left corner of the screen as the origin. The original image coordinates corresponding to the upper left corner (0, 0) of the screen are determined by the formula "(screen coordinates-offset) / zoom parameter": (-100 / 1.5, -50 / 1.5), i.e. (-66.67, -33.33), and the original image coordinates corresponding to the lower right corner (1080, 1920) of the screen are determined by the formula "(screen coordinates-offset) / zoom parameter": (653.33, 1246.67). It is finally determined that the user currently sees the area from (-66.67, -33.33) to (653.33, 1246.67) in the original image, forming a rectangular image area range.

[0070] It is checked whether the current zoom parameter exceeds a preset high-resolution threshold, i.e. a first preset threshold. If yes, the high-resolution loading process is triggered. For example, when the initial loading of the to-be-processed picture is performed, the original to-be-processed picture can be pre-cut into multiple small blocks, and each block can be pre-stored in the image pyramid in different resolution versions. When the high-resolution loading process is triggered, the corresponding high-resolution tile of the image area range is found in the pre-stored image pyramid, and the high-resolution tile is rendered in the display layer to increase the resolution of the image area range in the display layer.

[0071] Similarly, when the current zoom parameter is less than a preset low-resolution threshold, i.e. a second preset threshold, the corresponding low-resolution tile of the image area range is found in the pre-stored image pyramid, and the high-resolution tile is rendered in the display layer to decrease the resolution of the image area range in the display layer.

[0072] Through the above steps, the picture processing device can intelligently adjust the image quality when the user zooms in or out, which not only ensures the clarity of key details but also avoids unnecessary waste of resources, achieving a balance between image quality and performance.

[0073] Based on the above embodiments of the present application, in the sixth embodiment of the present application, the same or similar contents as the above embodiments can be referred to the above description, and the subsequent will not be described in detail. On this basis, step S27 includes steps S271-S274: Step S271, performing discrete wavelet transform on the to-be-processed picture to obtain the detail coefficients and the approximation coefficients corresponding to the to-be-processed picture.

[0074] It can be understood that the traditional image processing device uses a bilinear interpolation scaling algorithm, which is easy to cause rough edges of lines and produce a sawtooth effect under low scaling parameters. This is mainly because the bilinear interpolation estimates the new pixel value by linearly weighting the average of the surrounding pixel values when enlarging the image. This method significantly reduces the detail performance of the image under low scaling scenarios, making the originally smooth lines uneven.

[0075] To solve the above problems, in the present embodiment, an independent anti-aliasing processing module is inserted between the view parameter calculation layer and the rendering layer and the display layer. When the user's zoom operation triggers the update of the view display parameters, the anti-aliasing module receives the original to-be-processed picture data and the updated view display parameters, and outputs the anti-aliasing enhanced picture data. The enhanced picture data is transmitted to the rendering layer and the display layer for synchronous display.

[0076] Illustratively, using Daubechies-2 wavelet basis to perform 3-level discrete wavelet transform, the approximation coefficients cA and the detail coefficients are obtained by step-by-step decomposition. The detail coefficients can include horizontal detail coefficients cH, vertical detail coefficients cV, and diagonal detail coefficients cD. Among them, the approximation coefficients are the low-frequency components of the to-be-processed picture, which represent the overall outline and main structure of the picture. The detail coefficients are the high-frequency components of the to-be-processed picture, which represent the local changes and detail information of the image.

[0077] Step S272, classifying the edge strength of the to-be-processed picture according to the detail coefficients of the to-be-processed picture to obtain the edge mask of the to-be-processed picture.

[0078] It can be understood that wavelet transform can decompose the to-be-processed picture into high-frequency detail coefficients in different directions, which directly reflect the edge strength of the picture in the corresponding direction. For example, the larger the amplitude of the horizontal detail coefficient cH, the more significant the vertical edge in the picture. Therefore, the more significant edges can be selected for enhancement according to the strength of the detail coefficients to avoid rough edges.

[0079] Illustratively, the local energy E of each detail coefficient is calculated as follows: quantifying the edge intensity, normalizing the energy of each scale detail coefficient, and then weighting and merging the energy of the multi-level wavelet decomposition. Then, the above-mentioned detail coefficients are classified by a threshold classification method or a trained classifier, and the classification results are converted into a 0-1 edge mask to mark the edge region. Among them, represents the corresponding detail coefficient at the picture coordinates (x, y).

[0080] Step S273, after updating the view display parameter, determining an enhancement coefficient of the edge mask according to the scaling parameter, and determining an enhanced mask according to the enhancement coefficient and the edge mask.

[0081] Exemplarily, the enhancement coefficient a of the edge mask is determined according to the scaling parameter, wherein the enhancement coefficient a is inversely proportional to the scaling parameter, so as to ensure that the enhancement intensity is larger at a low scaling parameter, and the roughness of the line edge is significantly improved; at a high scaling parameter, the enhancement intensity gradually decreases, and image distortion caused by over-processing is avoided.

[0082] Specifically, after obtaining the enhancement coefficient, the detail coefficient is enhanced according to the enhancement coefficient: . Among them, is the enhanced detail coefficient, is the original detail coefficient, and M is the edge mask.

[0083] Step S274, according to the enhanced mask and the approximation coefficient, inverse discrete wavelet transform is performed on the to-be-processed picture to obtain an enhanced to-be-processed picture, and the enhanced to-be-processed picture is displayed on the rendering layer and the display layer at the same time.

[0084] The enhanced detail coefficient and the original approximation coefficient are combined, the picture data is reconstructed by inverse wavelet transform, and then the reconstructed picture data is displayed on the rendering layer and the display layer.

[0085] In this embodiment, the edge mask is determined by edge detection, which can accurately locate the edge region that needs to be processed and avoid over-processing of non-edge regions. And the intensity of edge enhancement is dynamically adjusted according to the scaling parameter, which can ensure that the best visual effect is obtained at different scaling ratios.

[0086] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the control method of the picture processing device of the present application. More forms of simple transformation based on this technical concept are within the protection scope of the present application.

[0087] The application provides a picture processing device, the picture processing device comprising: at least one processor; and a memory connected with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the control method of the picture processing device in the above embodiment one.

[0088] Reference is made below in conjunction with Figure 4 which shows a structural schematic diagram of a picture processing device suitable for implementing the embodiments of the application. The picture processing device in the embodiments of the application can include, but is not limited to, mobile terminals such as mobile phones, tablets (PAD, Portable Application Description), and the like, and fixed terminals such as desktop computers, and the like. Figure 4 The picture processing device shown is merely an example, and should not bring any limitation to the functions and use range of the embodiments of the application.

[0089] As Figure 4 shown, the picture processing device can include a processing apparatus 1001 (for example, a central processor, a graphics processor, and the like) which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM, Read Only Memory) 1002 or programs loaded from a storage apparatus 1003 into a random access memory (RAM, Random Access Memory) 1004. In the random access memory 1004, various programs and data required for the operation of the picture processing device are also stored. The processing apparatus 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: input apparatuses 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, and the like; output apparatuses 1008 including, for example, a liquid crystal display (LCD, Liquid Crystal Display), a speaker, a vibrator, and the like; the storage apparatus 1003 including, for example, a magnetic tape, a hard disk, and the like; and a communication apparatus 1009. The communication apparatus 1009 can allow the picture processing device to communicate with other devices wirelessly or by wire to exchange data. Although the picture processing device with various systems is shown in the figure, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be alternatively implemented or provided.

[0090] In particular, according to the embodiments of the present application, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, the embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for executing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments of the present application are executed.

[0091] The picture processing device provided by the present application adopts the control method of the picture processing device in the above-mentioned embodiments, and can solve the technical problem of how to improve the picture processing efficiency. Compared with the prior art, the picture processing device provided by the present application has the same beneficial effects as the control method of the picture processing device provided by the above-mentioned embodiments, and other technical features in the picture processing device are the same as the features disclosed in the above-mentioned embodiments, which will not be repeated here.

[0092] It should be understood that various parts of the present application can be realized by hardware, software, firmware or a combination thereof. In the description of the above-mentioned embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0093] The above is merely specific embodiments of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the present application, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

[0094] The present application provides a computer readable storage medium having stored thereon computer readable program instructions (i.e. computer program) for executing the control method of the picture processing device in the above-mentioned embodiments.

[0095] The computer readable storage medium provided in the present application may, for example, be a U disk, but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, system, or device, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electrical connection having one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer readable storage medium can be transmitted in any suitable medium, including but not limited to an electrical wire, an optical cable, a radio frequency (RF), and the like, or any suitable combination of the above.

[0096] The above computer readable storage medium can be contained in the picture processing device, or can exist separately without being assembled into the picture processing device.

[0097] The above computer readable storage medium carries one or more programs, which, when executed by the picture processing device, enable the picture processing device to write computer program code in one or more programming languages or combinations thereof for executing the operations of the present application. The programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user computer, partially on the user computer, or as a separate software package, partially on the user computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, through the Internet using an Internet service provider).

[0098] The flow and block diagrams in the drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flow and block diagrams can represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or the blocks may be executed in the reverse order, depending on the functionality involved. It will also be noted that each block of the block diagrams and / or flowchart illustrations, and combinations thereof, can be implemented by special purpose hardware-based systems that perform the specified functions or operations, or combinations of special purpose hardware and computer instructions.

[0099] The modules involved in the embodiments of the present application can be implemented in software or in hardware. In some cases, the names of the modules do not limit the modules themselves.

[0100] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer programs) for executing the control method of the picture processing device, and can solve the technical problem of how to improve the picture processing efficiency. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the control method of the picture processing device provided by the above-mentioned embodiments, which will not be repeated here.

[0101] The present application also provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the control method of the picture processing device as described above.

[0102] The computer program product provided by the present application can solve the technical problem of how to improve the picture processing efficiency. Compared with the prior art, the computer program product provided by the present application has the same beneficial effects as the control method of the picture processing device provided by the above-mentioned embodiments, which will not be repeated here.

[0103] The above only describes some embodiments of the present application, and does not limit the patent scope of the present application. Any equivalent structural transformation made by using the content of the present application specification and drawings, or direct / indirect application in other related technical fields is included in the patent protection scope of the present application.

Claims

1. A control method of a picture processing apparatus, characterized by, The control method of the picture processing device comprises: in response to a picture processing process triggering instruction, simultaneously displaying a to-be-processed picture on a display layer and a drawing layer, wherein the to-be-processed picture is transparently displayed on the drawing layer, and the drawing layer is overlaid on the display layer; in response to a control operation received by the drawing layer, updating view display parameters corresponding to the drawing layer and the display layer.

2. The control method of the picture processing apparatus according to claim 1, wherein The view display parameters comprise a zoom parameter, and the step of updating the view display parameters corresponding to the drawing layer and the display layer in response to the control operation received by the drawing layer comprises: when the number of touch points on the screen received by the drawing layer is two, determining the relative distance between the two touch points; if the change rate of the relative distance between the two touch points within a preset time is greater than a preset change threshold, updating the zoom parameter according to the relative distance between the two touch points.

3. The control method of the picture processing apparatus according to claim 2, wherein The step of updating the zoom parameter according to the relative distance between the two touch points further comprises: obtaining a custom size value of a brush, and determining the size of the brush in the drawing layer according to the ratio of the custom size value to the zoom parameter.

4. The control method of the picture processing apparatus according to claim 3, wherein The step of determining the size of the brush in the drawing layer according to the ratio of the custom size value to the zoom parameter further comprises: when the number of touch points on the screen received by the drawing layer is one, obtaining the moving track of the touch point; displaying the moving track on the drawing layer according to the moving track and the size of the brush.

5. The control method of the picture processing apparatus according to claim 4, wherein The drawing layer further comprises a static drawing layer and a dynamic drawing layer, and the step of displaying the moving track on the drawing layer according to the moving track and the size of the brush comprises: displaying the moving track on the dynamic drawing layer according to the moving track and the size of the brush; when the number of touch points on the screen received by the dynamic drawing layer is zero, superimposing the moving track in the dynamic drawing layer on the static drawing layer; clearing the data of the dynamic drawing layer.

6. The control method of the picture processing apparatus according to claim 5, wherein The step of displaying the moving track on the dynamic drawing layer according to the moving track and the size of the brush further comprises: determining the change rate of the included angle formed by three continuous touch point coordinates in the moving track; determining the ratio of the Euclidean distance between adjacent touch point coordinates to the time interval, to obtain the moving speed of the touch point; if the change rate of the included angle formed by the three touch point coordinates is greater than a preset change rate, and the moving speed of the touch point is greater than a preset speed threshold, smoothing the three touch point coordinates to obtain a new moving track.

7. The control method of the picture processing apparatus according to claim 2, wherein The view display parameters further comprise an offset parameter, and the step of determining the relative distance between the two touch points when the number of touch points on the screen received by the drawing layer is two further comprises: if the relative distance between the two touch points is unchanged, updating the offset parameter according to the offset of the touch point, wherein the offset parameter comprises a horizontal offset and a vertical offset; updating and displaying the to-be-processed picture on the display layer and the drawing layer simultaneously according to the updated view display parameters.

8. The control method of the picture processing apparatus according to claim 7, wherein The step of updating the display of the to-be-processed picture on the display layer and the drawing layer simultaneously according to the updated view display parameter comprises: performing discrete wavelet transform on the to-be-processed picture to obtain detail coefficients and approximation coefficients corresponding to the to-be-processed picture; classifying the edge strength of the to-be-processed picture according to the detail coefficients of the to-be-processed picture to obtain an edge mask of the to-be-processed picture; after updating the view display parameter, determining an enhancement coefficient of the edge mask according to the scaling parameter, and determining an enhanced mask according to the enhancement coefficient and the edge mask; performing inverse discrete wavelet transform on the to-be-processed picture according to the enhanced mask and the approximation coefficients to obtain an enhanced to-be-processed picture, and updating the display of the enhanced to-be-processed picture on the drawing layer and the display layer simultaneously.

9. An image processing apparatus, characterized by comprising: The device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the control method of the picture processing device according to any one of claims 1 to 8.

10. A storage medium, characterized by The storage medium is a computer readable storage medium, and the storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the control method of the picture processing device according to any one of claims 1 to 8.