Intelligent terminal, pixel processing method and computer-readable storage medium
By acquiring and optimizing the processing map table, targeted processing of target areas and pixels in the image is solved, and the wide applicability of image processing equipment and user experience is improved.
Patent Information
- Application Number
- CN201910778901.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-22
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2039-08-22
AI Technical Summary
The prior art cannot effectively adapt to different application scenarios in image processing, resulting in poor distortion correction effect and affecting image visual effects and measurement accuracy.
Generate distortion correction images by obtaining target areas manually or automatically selected by the user, obtaining target pixels, and using the optimization processing mapping table to optimize them in a targeted manner, including protecting key areas and gradient transition processing.
It improves the applicability and user experience of image processing equipment, ensures that the image meets user expectations, avoids the influence of distortion, and enhances product competitiveness.
Smart Images

Figure CN110533729B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a pixel processing method, an intelligent terminal applying the pixel processing method, and a computer-readable storage medium. Background Art
[0002] With the large-scale application of smart phones, taking photos is a key function of smart phones. People often take photos and videos when they get together with friends and at various gatherings.
[0003] However, due to the physical nonlinearity of camera lenses, the image processing inevitably results in distortion of the object's shape. This distortion can be categorized as pincushion, barrel, and linear distortion. This distortion not only affects the visual quality of the captured image but also, if directly applied to industrial close-range measurement, can reduce camera measurement accuracy, ultimately impacting the results.
[0004] In order to solve the above problems, the prior art provides an image processing method. If the distortion degree parameter of the image area to be corrected is greater than or equal to a preset distortion degree parameter, the central pixel grid of the image is obtained according to a preset size, and the image area to be corrected is divided into N pixel grids of the same size as the central pixel grid, where N is an integer greater than or equal to 2. The N pixel grids are corrected using the central pixel grid as a distortion correction reference to obtain a corrected image.
[0005] However, this method mainly uses the central pixel grid as the N pixel grids for distortion correction, which cannot adapt well to application scenarios where various images need to be optimized and processed. It has low practicality and a narrow scope of use, and cannot fundamentally solve the relevant technical problems in this field.
[0006] In view of the various deficiencies in the prior art, the inventors of this application have conducted in-depth research and proposed an intelligent terminal, a pixel processing method, and a computer-readable storage medium. Summary of the Invention
[0007] The purpose of this application is to provide an intelligent terminal, a pixel processing method and a computer-readable storage medium, which can directly obtain the target pixels of the area to be optimized and then perform targeted optimization processing. It can be applied to most image processing devices, facilitate promotion and use, and improve product technical competitiveness.
[0008] To solve the above technical problems, the present application provides a pixel processing method. As one implementation method, the pixel processing method includes the following steps:
[0009] Acquiring an area to be optimized, wherein a target area manually selected by a user is acquired, and / or a preset area selection rule is acquired and a corresponding target area is automatically selected according to the area selection rule to serve as the area to be optimized;
[0010] Acquire a target pixel located in the area to be optimized;
[0011] The target pixel is optimized.
[0012] As one embodiment, after the step of obtaining the area to be optimized, the method further includes:
[0013] An optimization processing mapping table for performing optimization processing is generated and / or updated according to the acquired area to be optimized.
[0014] As one implementation manner, before the step of obtaining the area to be optimized, the method further includes:
[0015] An optimization processing mapping table for performing optimization processing is generated and / or obtained in advance.
[0016] As one implementation manner, the step of pre-generating and / or obtaining an optimization processing mapping table for performing optimization processing specifically includes:
[0017] Obtain and / or photograph a calibration plate;
[0018] A corresponding optimization processing mapping table is obtained by calculation according to the calibration plate.
[0019] As one implementation manner, the step of pre-generating and / or obtaining an optimization processing mapping table for performing optimization processing specifically includes:
[0020] Determine the type and model of your own device;
[0021] According to the type model, an optimization processing mapping table matching itself is obtained from the network end.
[0022] As one implementation manner, the step of obtaining the target area manually selected by the user specifically includes:
[0023] Divide the overall area into multiple area blocks;
[0024] Obtaining a user's selection operation on the plurality of area blocks;
[0025] The selected target area is confirmed according to at least one area block selected by the user.
[0026] As one embodiment, the step of obtaining the user's selection operation on the multiple area blocks includes multiple point selection, line continuous selection and / or smear selection.
[0027] As one implementation manner, the step of automatically selecting the corresponding target area according to the area selection rule specifically includes:
[0028] Determine whether there is a protected area that does not allow optimization processing according to the area selection rule;
[0029] Other target areas outside the area to be protected are used as the area to be optimized.
[0030] As one implementation manner, the step of determining whether there is a protected area that is not allowed to be optimized according to the area selection rule specifically includes:
[0031] The area selection rules of the AI artificial intelligence algorithm are used to determine whether there are protected areas that are not allowed to be optimized. The area selection rules are used to define areas that are allowed to be optimized and / or protected areas that are not allowed to be optimized. The protected areas that are not allowed to be optimized include face areas, human body areas, and key feature areas for document certification.
[0032] As one implementation manner, the step of optimizing the target pixel further includes:
[0033] Perform protection treatment on the protected areas that are not areas to be optimized;
[0034] Perform a gradual transition process on the connecting area between the area to be optimized and the area to be protected.
[0035] As one implementation manner, the step of performing a gradual transition process on the connecting area between the area to be optimized and the area to be protected specifically includes:
[0036] Performing weighted processing on the transition pixels in the connection area;
[0037] The weighted connection areas are generated and / or updated into an optimization processing mapping table for performing optimization processing.
[0038] As one implementation manner, the step of performing a gradual transition process on the connecting area between the area to be optimized and the area to be protected specifically includes:
[0039] Taking the transition pixel point located in the area to be protected as the center, weight diffusion processing is performed towards the area to be optimized.
[0040] In order to solve the above technical problems, the present application also provides an intelligent terminal, which, as one of its implementation modes, is configured with a processor, and the processor is used to execute program data to implement the pixel processing method as described above.
[0041] As one implementation manner, the pixel processing method is used to perform pixel distortion correction, and a distortion correction mapping table is used to optimize the target pixel.
[0042] In order to solve the above technical problems, the present application also provides a computer-readable storage medium, as one of its implementation methods, which is used to store program data. When the program data is executed by a processor, it implements the pixel processing method as described above.
[0043] The present application provides a smart terminal, a pixel processing method, and a computer-readable storage medium. The pixel processing method includes the steps of obtaining an area to be optimized, obtaining target pixels located in the area to be optimized, and optimizing the target pixels. Through the above-mentioned method, the present application can directly obtain the target pixels in the area to be optimized and then perform targeted optimization processing. This method can be applied to most image processing devices, facilitates promotion and use, and improves the product's technological competitiveness. Furthermore, the images captured by the product better meet the user's expectations, and will not cause distortion or other issues that affect the user experience, thereby improving the user experience.
[0044] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, which can be implemented in accordance with the contents of the specification, and to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the following specifically cites a preferred embodiment and describes it in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 This is a flowchart of an embodiment of the pixel processing method of the present application.
[0046] Figure 2 This is a rendering of the first embodiment of pixel optimization using the pixel processing method of the present application.
[0047] Figure 3 This is a rendering of the second embodiment of pixel optimization using the pixel processing method of the present application.
[0048] Figure 4 This is a structural diagram of an embodiment of the smart terminal of this application. DETAILED DESCRIPTION
[0049] In order to further explain the technical means and effects adopted by this application to achieve the intended application purpose, the following is a detailed description of this application in conjunction with the accompanying drawings and preferred embodiments.
[0050] Through the description of the specific implementation methods, a deeper and more specific understanding of the technical means and effects adopted by this application to achieve the intended purpose can be obtained. However, the accompanying drawings are only for reference and illustration purposes and are not used to limit this application.
[0051] See also Figure 1 , Figure 1 This is a flowchart of an embodiment of the pixel processing method of the present application.
[0052] It should be noted that the pixel processing method described in this embodiment may include but is not limited to the following steps.
[0053] Step S101 , obtaining an area to be optimized, wherein a target area manually selected by a user is obtained, and / or a preset area selection rule is obtained and a corresponding target area is automatically selected according to the area selection rule to serve as the area to be optimized.
[0054] Step S102: Acquire target pixels located in the area to be optimized.
[0055] Step S103: Optimize the target pixel.
[0056] First of all, it should be noted that in the first preferred embodiment, the target area manually selected by the user is obtained as the area to be optimized. In this way, the user can specify the optimization of any area of the image interface according to his own judgment and / or needs, thereby increasing the interactive experience between users and making it more in line with the user's operational needs.
[0057] Secondly, for some users who are accustomed to direct use and not accustomed to setting functions, in a second preferred embodiment of this application, the preset area selection rules are obtained; and the corresponding target area is automatically selected according to the area selection rules as the area to be optimized. It is not difficult to understand that some users are not very interested in smart terminals and therefore rarely set up functions. In particular, users are unable to adapt to complex and numerous functions. Therefore, for this special case, this application can also provide such a device's own intelligent setting method to assist users in pixel optimization and improve user experience.
[0058] It is worth mentioning that, after the step of obtaining the area to be optimized described in this embodiment, the following step may also be included: generating and / or updating an optimization processing mapping table for performing optimization processing according to the obtained area to be optimized.
[0059] It should be noted here that the present embodiment can optimize the pixels by optimizing the processing mapping table, which can speed up the processing efficiency and ensure that the optimized pixels are the pixel positions that need to be optimized in the final image, thereby avoiding processing the wrong pixels and generating worse image quality.
[0060] In this embodiment, before the step of obtaining the area to be optimized, the method may further include: pre-generating and / or obtaining an optimization processing mapping table for performing the optimization processing.
[0061] It is easy to understand that this embodiment can detect the pixels in advance, and then find the pixels that need to be optimized for calibration; of course, in some special products, such as products in the same series, there may be distortion of pixels in the same area, etc. Therefore, this embodiment can download a unified optimization processing mapping table from the supplier, and then perform the same optimization processing positions and pixels on all products in the same series.
[0062] It should be explained in detail that the steps of pre-generating and / or obtaining an optimization processing mapping table for optimization processing described in this embodiment may specifically include: obtaining and / or photographing a calibration plate; and calculating and obtaining a corresponding optimization processing mapping table based on the calibration plate.
[0063] For example, this embodiment can first photograph the calibration plate and then calibrate the camera of the smart terminal, and then use the photographed calibration plate to calculate the distortion correction parameters of the lens and other system parameters, and then use the distortion correction parameters to generate a distortion correction pixel mapping table of the entire image (i.e., an optimized processing mapping table), and then use the distortion correction pixel mapping table to complete the distortion correction of the original image taken by the camera of the smart terminal.
[0064] Furthermore, the steps of pre-generating and / or obtaining an optimization processing mapping table for performing optimization processing described in this embodiment may specifically include: determining the type and model of the device itself; and obtaining an optimization processing mapping table that matches itself from the network end based on the type and model.
[0065] In this embodiment, the step of obtaining a target area manually selected by a user as the area to be optimized may specifically include: dividing the overall area into multiple area blocks; obtaining the user's selection operation on the multiple area blocks; and confirming the selected target area as the area to be optimized based on at least one area block selected by the user.
[0066] The plurality of area blocks may be formed by dividing the entire area into a nine-square grid or other manners, which is not limited here.
[0067] Specifically, in the step of obtaining the user's selection operation on the multiple area blocks in this embodiment, the selection operation includes multiple point selection, continuous line selection and / or smear selection.
[0068] It is easy to understand that the multi-point selection may refer to multiple discontinuous single-point selections, while the continuous line selection may be a one-time multiple-selection action for the entire area, etc. The smear selection may be a precise area selection for the entire area, thereby avoiding misoperation, etc.
[0069] It should be noted that the step of automatically selecting the corresponding target area according to the area selection rule as the area to be optimized in this embodiment can specifically include: judging whether there is a protected area that is not allowed to be optimized according to the area selection rule; and using other target areas outside the protected area as the area to be optimized.
[0070] It is not difficult to understand that some areas, such as historical paintings and objects such as national flags and national emblems that cannot be smeared, will need to be protected to avoid being accidentally modified into disrespectful graffiti versions, etc. Therefore, the implementation methods of this application can provide targeted protection for such objects.
[0071] For example, the step of determining whether there is a protected area that is not allowed to be optimized according to the area selection rules described in this embodiment may specifically include: determining whether there is a protected area that is not allowed to be optimized according to the area selection rules of the AI artificial intelligence algorithm, wherein the area selection rules are used to define areas that are allowed to be optimized and / or protected areas that are not allowed to be optimized, and the protected areas that are not allowed to be optimized include face areas, human body areas, and key feature areas for document certification.
[0072] It should be noted that the area selection rules described in this embodiment can use a positive description method to specify some pixels that do not belong to the key areas for optimization, such as general street scenes, skies, fields, grasslands, etc., because their overall appearance is relatively consistent and local features have little impact on the overall situation; of course, a negative description method can also be used to specify some relatively key feature areas, such as the above-mentioned faces, separate selfies, some pictures or objects used for feature recognition, etc. Furthermore, the area selection rules can be dynamically and intelligently adjusted according to different scenarios to meet different application scenarios and different user needs.
[0073] Furthermore, the step of optimizing the target pixel in this embodiment may also include: performing protection processing on the protected area that is not the area to be optimized; and performing gradual transition processing on the connecting area between the area to be optimized and the area to be protected.
[0074] For example, the step of performing gradual transition processing on the connecting area between the area to be optimized and the area to be protected in this embodiment may specifically include: performing weighted processing on the transition pixel points of the connecting area; generating and / or updating the connecting area that has undergone weighted processing to an optimization processing mapping table for performing optimization processing.
[0075] For example, the weight of the middle pixel point in the connection area can be set to 1, and the connection area transitions from the boundary of the area that does not need to be corrected to the area that needs to be corrected, which can form a gradual transition to prevent the undesirable situation of uneven pixel jumps.
[0076] Specifically, the step of performing a gradual transition process on the connecting area between the area to be optimized and the area to be protected includes: performing a weight diffusion process toward the area to be optimized with a transition pixel point located in the area to be protected as the center.
[0077] By means of weight processing, the present application adds weights to the optimized processing mapping table for distortion correction of the corresponding area, thereby achieving a natural transition without distortion during distortion correction. Moreover, by correcting the image pixels through the optimized mapping table, an image in which a part of the area is distortion corrected can be generated.
[0078] The following will be described in conjunction with specific embodiments.
[0079] Example 1:
[0080] Process 201: First, photograph the calibration plate to calibrate the lens.
[0081] Process 202: Calculate and obtain the distortion correction parameters of the lens.
[0082] Process 203: Generate an optimized processing mapping table for distortion correction of the entire image using the distortion correction parameters.
[0083] Process 204: Use the distortion correction optimization processing mapping table to complete the distortion correction of the original image captured by the camera.
[0084] Process 205 : completing regional optimized distortion correction by optimizing the distortion correction optimization processing mapping table.
[0085] Process 206 : The user manually selects an area that does not require correction.
[0086] Process 207, such as Figure 2 As shown, Mark 2 area is the area selected by the user, and the rest are Mark 1 areas.
[0087] In process 208 , the selected Mark 2 area is not processed when the full image distortion correction is performed, and the unselected Mark 1 area is subjected to distortion correction.
[0088] Process 209: For the transition zone between the Mark 1 area that needs correction and the Mark 2 area that does not need correction, the weight is diffused to the surrounding areas with the boundary of the Mark 2 area as the center, so as to achieve a natural transition without distortion during distortion.
[0089] Process 210: For the selected area, the system of the smart terminal will automatically recalculate the optimized processing mapping table based on the selected area in the background.
[0090] In process 211 , the image is corrected by using the optimized optimization processing mapping table to generate a partial area distortion corrected image.
[0091] Example 2:
[0092] Process 301: First, photograph the calibration plate to calibrate the lens.
[0093] Process 302: Calculate and obtain the distortion correction parameters of the lens.
[0094] Process 303: Use the distortion correction parameters to generate an optimized processing mapping table for distortion correction of the entire image.
[0095] Process 304: Use the distortion correction optimization processing mapping table to complete the distortion correction of the original image captured by the camera.
[0096] Process 305: Complete regional optimized distortion correction by optimizing the distortion correction optimization processing mapping table.
[0097] Process 306 : The system of the smart terminal automatically detects and identifies the area that needs correction.
[0098] Process 307, such as Figure 3 , automatically segment and detect the face or body area through AI (artificial intelligence) algorithm, and perform distortion correction and protection on the area.
[0099] Process 308, such as Figure 3 The selected face or body area will not be processed during the full image distortion correction to prevent the face or body area from being stretched and deformed.
[0100] In process 309 , the unselected white area is subjected to distortion correction processing.
[0101] In process 310, for the transition zone between the face or body area that needs correction and the white area that does not need correction, the weight is diffused to the surrounding areas with the boundary of the face or body area as the center, so as to achieve a natural transition without distortion during distortion.
[0102] Process 311: For the selected area, the system of the smart terminal will automatically recalculate the optimized processing mapping table based on the selected area in the background.
[0103] In process 312, the image is corrected by using the optimized optimization processing mapping table to generate a partial area distortion corrected image.
[0104] See also Figure 4 In order to solve the above technical problems, the present application also provides an intelligent terminal, which is one of the implementation methods and is equipped with a processor 21. The processor 21 is used to execute program data to implement the pixel processing method described above.
[0105] As mentioned above, in a specific embodiment, the pixel processing method is used to perform pixel distortion correction, and a distortion correction mapping table is used to optimize the target pixel.
[0106] Specifically, the processor 21 is used to obtain the area to be optimized.
[0107] The processor 21 is configured to obtain target pixels located in the area to be optimized.
[0108] The processor 21 is configured to perform optimization processing on the target pixel.
[0109] First, it should be noted that, in the first preferred embodiment, the processor 21 is used to obtain the area to be optimized, which may specifically include: the processor 21 is used to obtain a target area manually selected by a user as the area to be optimized.
[0110] It is easy to understand that in this way, users can specify and optimize any area of the image interface according to their own judgment and / or needs, thereby increasing the interactive experience between users and making it more in line with the user's operational needs.
[0111] Secondly, for some users who are accustomed to direct use and not accustomed to setting functions, in the second preferred embodiment of the present application, the processor 21 is used to obtain the area to be optimized, which may specifically include: the processor 21 is used to obtain a preset area selection rule; according to the area selection rule, the corresponding target area is automatically selected as the area to be optimized.
[0112] It is not difficult to understand that some users are not very interested in smart terminals, so they rarely set up functions, especially when the functions are complex and numerous, and users have no way to adapt. Therefore, for this special situation, this application can also provide a way for the device itself to be intelligently set up to assist users in pixel optimization and improve user experience.
[0113] It is worth mentioning that, after the processor 21 in this embodiment is used to obtain the area to be optimized, the following may also be included: the processor 21 is used to generate and / or update an optimization processing mapping table for performing optimization processing according to the obtained area to be optimized.
[0114] It should be noted here that the present embodiment can optimize the pixels by optimizing the processing mapping table, which can speed up the processing efficiency and ensure that the optimized pixels are the pixel positions that need to be optimized in the final image, thereby avoiding processing the wrong pixels and generating worse image quality.
[0115] In this embodiment, before the processor 21 is used to obtain the area to be optimized, the process may further include: pre-generating and / or obtaining an optimization processing mapping table for performing the optimization process.
[0116] It is easy to understand that this embodiment can detect the pixels in advance, and then find the pixels that need to be optimized for calibration; of course, in some special products, such as products in the same series, there may be distortion of pixels in the same area, etc. Therefore, this embodiment can download a unified optimization processing mapping table from the supplier, and then perform the same optimization processing positions and pixels on all products in the same series.
[0117] It should be explained in detail that the pre-generation and / or acquisition of the optimization processing mapping table for optimization processing described in this embodiment may specifically include: the processor 21 is used to obtain and / or photograph the calibration plate; the processor 21 is used to calculate and obtain the corresponding optimization processing mapping table based on the calibration plate.
[0118] For example, this embodiment can first photograph the calibration plate and then calibrate the camera of the smart terminal, and then use the photographed calibration plate to calculate the distortion correction parameters of the lens and other system parameters, and then use the distortion correction parameters to generate a distortion correction pixel mapping table of the entire image (i.e., an optimized processing mapping table), and then use the distortion correction pixel mapping table to complete the distortion correction of the original image taken by the camera of the smart terminal.
[0119] Furthermore, the pre-generation and / or acquisition of the optimization processing mapping table for optimization processing described in this embodiment may specifically include: the processor 21 is used to determine the type and model of its own device; and obtain an optimization processing mapping table that matches itself from the network end according to the type and model.
[0120] In this embodiment, the processor 21 is used to obtain a target area manually selected by a user as the area to be optimized, which may specifically include: the processor 21 is used to divide the overall area into multiple area blocks; obtain the user's selection operation on the multiple area blocks; and confirm the selected target area based on at least one area block selected by the user as the area to be optimized.
[0121] The plurality of area blocks may be formed by dividing the entire area into a nine-square grid or other manners, which is not limited here.
[0122] Specifically, the processor 21 in this embodiment is used to obtain the user's selection operation on the multiple area blocks, and the selection operation includes multi-point selection, continuous line selection and / or smear selection.
[0123] It is easy to understand that the multi-point selection may refer to multiple discontinuous single-point selections, while the continuous line selection may be a one-time multiple-selection action for the entire area, etc. The smear selection may be a precise area selection for the entire area, thereby avoiding misoperation, etc.
[0124] It should be noted that the processor 21 described in this embodiment is used to automatically select the corresponding target area according to the area selection rule as the area to be optimized, which may specifically include: the processor 21 is used to determine whether there is a protected area that is not allowed to be optimized according to the area selection rule; and use other target areas outside the protected area as the area to be optimized.
[0125] It is not difficult to understand that some areas, such as historical paintings and objects such as national flags and national emblems that cannot be smeared, will need to be protected to avoid being accidentally modified into disrespectful graffiti versions, etc. Therefore, the implementation methods of this application can provide targeted protection for such objects.
[0126] For example, the processor 21 in this embodiment is used to determine whether there is a protected area that is not allowed to be optimized based on the area selection rules. Specifically, it may include: the processor 21 is used to determine whether there is a protected area that is not allowed to be optimized through the area selection rules of the AI artificial intelligence algorithm, wherein the area selection rules are used to define areas that are allowed to be optimized and / or protected areas that are not allowed to be optimized, and the protected areas that are not allowed to be optimized include face areas, human body areas, and key feature areas for document certification.
[0127] Furthermore, the processor 21 in this embodiment is used to optimize the target pixel, and may also include: protecting the protected area that is not the area to be optimized; and performing a gradual transition process on the connecting area between the area to be optimized and the area to be protected.
[0128] For example, the processor 21 described in this embodiment is used to perform gradual transition processing on the connecting area between the area to be optimized and the area to be protected, which may specifically include: the processor 21 is used to perform weighted processing on the transition pixel points of the connecting area; the connecting area that has undergone weighted processing is generated and / or updated to an optimization processing mapping table for optimization processing.
[0129] For example, the weight of the middle pixel point in the connection area can be set to 1, and the connection area transitions from the boundary of the area that does not need to be corrected to the area that needs to be corrected, which can form a gradual transition to prevent the undesirable situation of uneven pixel jumps.
[0130] Specifically, the processor 21 is used to perform a gradual transition process on the connecting area between the area to be optimized and the area to be protected, specifically including: the processor 21 is used to perform a weight diffusion process to the area to be optimized with the transition pixel point located in the area to be protected as the center.
[0131] By means of weight processing, the present application adds weights to the optimized processing mapping table for distortion correction of the corresponding area, thereby achieving a natural transition without distortion during distortion correction. Moreover, by correcting the image pixels through the optimized mapping table, an image in which a part of the area is distortion corrected can be generated.
[0132] In addition, the present application also provides a computer-readable storage medium, as one embodiment thereof, which is used to store program data. When the program data is executed by a processor, it is used to implement the pixel processing method described in any of the above embodiments.
[0133] The present application provides a smart terminal, a pixel processing method, and a computer-readable storage medium. The pixel processing method includes the steps of obtaining an area to be optimized, obtaining target pixels located in the area to be optimized, and optimizing the target pixels. Through the above-mentioned method, the present application can directly obtain the target pixels in the area to be optimized and then perform targeted optimization processing. This method can be applied to most image processing devices, facilitates promotion and use, and improves the product's technological competitiveness. Furthermore, the images captured by the product better meet the user's expectations, and will not cause distortion or other issues that affect the user experience, thereby improving the user experience.
[0134] In this application, the smart terminal may be a mobile phone, a tablet computer, a wearable device, a smart TV, a smart camera, etc.
[0135] It should be supplemented that the mobile phone described in this embodiment can preferably be provided with an Android system having an application layer, an application framework layer, a library layer, and a kernel layer.
[0136] In this implementation, the application layer primarily operates on top of the Android SDK, utilizing the APIs provided by Android for development and generating APK packages. The application framework layer integrates various native Android controls and classes, providing an efficient and convenient API interface for application development. This provides a unified interface for application developers and a unified standard for integrating various libraries. The library layer is the communication interface between Android and the underlying hardware. It encapsulates the underlying hardware interface to implement the specific logic of the module and exposes it to the application framework as a service via the Binder communication mechanism. The kernel layer directly interfaces with the hardware and can be understood as a device driver.
[0137] At the same time, the overall camera architecture of the Android system of this application can include the functions of viewfinder and taking pictures. The architecture of the MTK Android Camera program is divided into two parts: client and server, and can be built on the structure of Android's inter-process communication Binder.
[0138] Specifically, the Camera application layer in this embodiment is presented on Android as a Camera application APK package developed by directly calling the SDK API. It is mainly written in Java language and encapsulated based on the android.hardware.Camera class call, and implements the business logic and UI display of the Camera application.
[0139] In this implementation, android.hardware.Camera is the Camera class provided by Android to the upper layer for calling. It can be used to connect or disconnect a Camera service, set shooting parameters, start or stop preview, take photos, etc. It can also be used as an interface exposed by the Android Camera application framework. If an Android application wants to use this class, it needs to declare the Camera permission in the Manifest file and add some <uses-feature>Element to declare the Camera features in the application, such as autofocus.
[0140] The Camera framework layer of this embodiment isolates the application from the underlying implementation, implements a set of Android-defined upper and lower interface specifications, and facilitates the development and porting of applications and underlying hardware.
[0141] In a specific embodiment, the smart terminal may further include an image signal processing block, an image capture block, a control circuit, a focus control module, an exposure control module, and an optical system. The control circuit within the image capture block may include the focus control module and the exposure control module. The optical system may include a lens module, the focus setting and exposure setting (e.g., aperture size and / or shutter speed) of the lens module being controlled by the focus control module and the exposure control module, respectively. The image signal processing block includes multiple signal processing modules, such as a front-end processing module, a white balance module, a color interpolation module, a color conversion module, and a back-end processing module. The front-end processing module may perform operations such as dark current compensation, linearization, and flash compensation. The white balance module may perform automatic or manual white balance compensation by applying different weighting factors to the red (R), green (G), and blue (B) components of the image. The color interpolation module may use pixel gamut information to estimate the color value of a pixel, where the pixel color value is not measured / sensed by the image sensor. The color conversion module may perform color conversion from one color gamut to another. For example, the color conversion module can convert a color image from RGB to YUV format to generate a grayscale image composed of pixel brightness and grayscale values, where Y represents grayscale value and U and V represent chrominance. The back-end processing module can perform operations such as color artifact removal, edge enhancement, and coring noise reduction.
[0142] For example, but not to limit the present invention, to change all configurations of the control circuit and the image signal processing block, it can be achieved by disabling at least one of the signal processing module in the image signal processing block and the control module in the control circuit, or by controlling at least one of the signal processing module and the control module to adopt a different algorithm (for example, a simplified algorithm or a low-power algorithm).
[0143] The above description is merely a preferred embodiment of the present application and does not constitute any form of limitation to the present application. Although the present application has been disclosed as a preferred embodiment, it is not intended to limit the present application. Any technician familiar with this profession can make slight changes or modifications to equivalent embodiments using the technical content disclosed above without departing from the scope of the technical solution of the present application. However, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application are still within the scope of the technical solution of the present application.
Claims
1. A pixel processing method, characterized in that: The pixel processing method comprises the steps of: Acquiring an area to be optimized, wherein a target area manually selected by a user is acquired, and / or a preset area selection rule is acquired and a corresponding target area is automatically selected according to the area selection rule to serve as the area to be optimized; The step of automatically selecting the corresponding target area according to the area selection rule specifically includes: Determining whether there is a protected area that does not allow optimization processing based on the area selection rule specifically includes: Determine whether there are protected areas that are not allowed to be optimized using the area selection rules of the AI artificial intelligence algorithm, wherein the area selection rules are used to define areas that are allowed to be optimized and / or protected areas that are not allowed to be optimized. The protected areas that are not allowed to be optimized include facial areas, human body areas, and key feature areas of document identification; Using other target areas outside the area to be protected as the area to be optimized; Acquire a target pixel located in the area to be optimized; performing optimization processing on the target pixel; The optimizing process for the target pixel includes: Perform protection treatment on the protected areas that are not areas to be optimized; Perform a gradual transition process on the connecting area between the area to be optimized and the area to be protected.
2. The pixel processing method according to claim 1, wherein: After the step of obtaining the area to be optimized, the method further includes: An optimization processing mapping table for performing optimization processing is generated and / or updated according to the acquired area to be optimized.
3. The pixel processing method according to claim 1, wherein: Before the step of obtaining the area to be optimized, the method further includes: An optimization processing mapping table for performing optimization processing is generated and / or obtained in advance.
4. The pixel processing method according to claim 3, wherein: The step of pre-generating and / or obtaining an optimization processing mapping table for performing optimization processing specifically includes: Obtain and / or photograph a calibration plate; A corresponding optimization processing mapping table is obtained by calculation according to the calibration plate.
5. The pixel processing method according to claim 3, wherein: The step of pre-generating and / or obtaining an optimization processing mapping table for performing optimization processing specifically includes: Determine the type and model of your own device; According to the type model, an optimization processing mapping table matching itself is obtained from the network end.
6. The pixel processing method according to claim 1, wherein: The step of obtaining the target area manually selected by the user specifically includes: Divide the overall area into multiple area blocks; Obtaining a user's selection operation on the plurality of area blocks; The selected target area is confirmed according to at least one area block selected by the user.
7. The pixel processing method according to claim 6, wherein: The step of obtaining the user's selection operation on the multiple area blocks, wherein the selection operation includes multiple point selection, continuous line selection and / or smear selection.
8. The pixel processing method according to claim 1, wherein: The step of performing a gradual transition process on the connecting area between the area to be optimized and the area to be protected specifically includes: Performing weighted processing on the transition pixels in the connection area; The weighted connection areas are generated and / or updated into an optimization processing mapping table for performing optimization processing.
9. The pixel processing method according to claim 1, wherein: The step of performing a gradual transition process on the connecting area between the area to be optimized and the area to be protected specifically includes: Taking the transition pixel point located in the area to be protected as the center, weight diffusion processing is performed towards the area to be optimized.
10. An intelligent terminal, characterized in that: It is configured with a processor, which is used to execute program data to implement the pixel processing method according to any one of claims 1 to 9.
11. The intelligent terminal according to claim 10, characterized in that: The pixel processing method is used to perform pixel distortion correction, and uses a distortion correction mapping table to optimize the target pixel.
12. A computer-readable storage medium, characterized in that It is used to store program data, which, when executed by a processor, implements the pixel processing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Optimization method and device for area display effect, and ultrasonic diagnostic system
CN106456109A