Image processing method, electronic equipment and medium

By converting images into raster graphics and using the size of the dots to represent image features, the problems of large image data size and hardware compatibility are solved, achieving low-cost, cross-platform image display and interactive effects.

CN121746159APending Publication Date: 2026-03-27纳欣科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411351464.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

The large size of the image data puts a lot of pressure on the transmission and display process, and there are hardware and software compatibility issues between the monitor and the image file.

Method used

Converting a target image into a bitmap allows you to represent image features by the size of the dots. In a bitmap, the dots in the foreground and background areas are of different sizes. Using bitmaps to display image content is suitable for various display devices.

Benefits of technology

It reduces the pressure on image data transmission and display, reduces the possibility of hardware incompatibility, has low development costs, is suitable for different platforms, and supports interactive display effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121746159A_ABST
    Figure CN121746159A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an image processing method, electronic equipment and a medium. The image processing method comprises the steps that a target image is obtained, the target image is converted into a lattice diagram, the lattice diagram comprises a plurality of points, and the lattice diagram represents the features of the target image through the sizes of the points.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of multimedia technology, and in particular to an image processing method, electronic device, and medium. Background Technology

[0002] Image files can be displayed on a variety of monitors to produce rich visual effects or efficiently convey information. However, image data is usually large, which puts pressure on the transmission and display process, and there may also be some hardware and software compatibility issues between monitors and image files. Summary of the Invention

[0003] To address the problems in the related technologies, this disclosure provides an image processing method, an electronic device, and a medium.

[0004] One aspect of this disclosure provides an image processing method, including obtaining a target image; converting the target image into a bitmap, the bitmap comprising a plurality of points, the bitmap representing features of the target image by the size of the points.

[0005] According to an embodiment of this disclosure, converting the target image into a bitmap includes: dividing the target image into several target regions, wherein the number of the several target regions is the same as the number of points in the bitmap and they correspond one-to-one; for each target region, determining the size of the point in the bitmap corresponding to the target region based on the pixels in the target region.

[0006] According to embodiments of this disclosure, the target image is a grayscale frame, or the method further includes converting the target image to a grayscale frame if the target image is a color frame.

[0007] According to embodiments of this disclosure, determining the size of a point in a bitmap corresponding to the target region based on pixels within the target region includes determining the size of the point in the bitmap corresponding to the target region based on the grayscale values ​​of pixels within the target region.

[0008] According to embodiments of this disclosure, determining the size of a point in a dot matrix corresponding to a target region includes: determining whether the target region is a foreground region or a background region; when the target region is a background region, determining the size of the point corresponding to the target region as a first size, wherein the first size is a fixed value; when the target region is a foreground region, determining the size of the point corresponding to the target region as a second size, wherein the second size is different from the first size.

[0009] According to embodiments of this disclosure, the second dimensions corresponding to different target regions in the target region of the foreground region are the same or different.

[0010] According to embodiments of this disclosure, determining a target region as a foreground region or a background region includes determining the target region as a foreground region or a background region based on the grayscale values ​​of pixels within the target region.

[0011] According to embodiments of this disclosure, determining whether a target region is a foreground region or a background region based on the grayscale values ​​of pixels within the target region includes: determining whether the target region is a foreground region or a background region based on the grayscale value of the center pixel of the target region; or determining whether the target region is a foreground region or a background region based on the average grayscale values ​​of the pixels in the target region.

[0012] According to embodiments of this disclosure, determining whether a target region is a foreground region or a background region includes: comparing the grayscale value of each pixel within the target region with a grayscale threshold to determine the number of pixels with grayscale values ​​greater than the grayscale threshold; determining the ratio of the number of pixels with grayscale values ​​greater than the grayscale threshold to the total number of pixels in the target region; and determining whether the target region is a foreground region or a background region based on a comparison of the ratio with a proportional threshold.

[0013] According to embodiments of this disclosure, when the target region is a foreground region, the size of the point corresponding to the target region in the bitmap is positively or negatively correlated with the feature gray value, wherein the feature gray value is the gray value of the center pixel of the target region or the average gray value of the pixels in the target region.

[0014] According to an embodiment of this disclosure, determining the size of a point in a bitmap corresponding to the target region based on pixels within the target region includes: identifying a background region of the target image; determining whether the target region is a foreground region or a background region based on the proportion of pixels belonging to the background region within the target region; and determining the size of a point in a bitmap corresponding to the target region based on whether the target region is a foreground region or a background region, wherein the background region corresponds to a fixed first size, and the foreground region corresponds to a fixed or variable second size, the second size being greater than or less than the first size.

[0015] According to an embodiment of this disclosure, the image processing method further includes obtaining video data and obtaining a target image from the video data, wherein the target image is at least one image frame of the video data.

[0016] According to embodiments of this disclosure, the image processing method further includes saving or sending a bitmap; or displaying an animation based on multiple bitmaps.

[0017] According to an embodiment of this disclosure, the image processing method further includes receiving input from a user on a touchscreen, determining multiple target points around the location touched by the user, and displaying a change effect based on the multiple target points.

[0018] According to an embodiment of this disclosure, when the target area is a background area, the target point has a first size; when the target area is a foreground area, the target point has a second size, and the second size is larger than the first size. The step of displaying a change effect based on the plurality of target points includes: when the area corresponding to the target point is a background area, the size of the target point gradually changes from a third size to the first size, and the third size is larger than the first size; or, when the area corresponding to the target point is a foreground area, the size of the target point gradually changes from a fourth size to the second size, and the fourth size is smaller than the second size.

[0019] According to an embodiment of this disclosure, the step of displaying a change effect based on the plurality of target points includes: if the target point is not in the animation list, then adding the target point to the animation list and starting to execute a point animation, in which the size of the target point changes continuously, and after the point animation ends, removing the target point from the animation list.

[0020] According to embodiments of this disclosure, when the target area is a background area, the target point has a first size; when the target area is a foreground area, the target point has a second size, and the second size is larger than the first size. The continuous change in the size of the target point includes, when the area corresponding to the target point is a background area, the size of the target point gradually changes from a third size to the first size, and the third size is larger than the first size; or when the area corresponding to the target point is a foreground area, the size of the target point gradually changes from a fourth size to the second size, and the fourth size is smaller than the second size.

[0021] Another aspect of this disclosure provides an electronic device including at least one processor and a memory communicatively connected to the at least one processor. The memory stores instructions executable by the at least one processor, which are executed by the at least one processor to cause the processor to implement the method described above.

[0022] Another aspect of this disclosure provides a computer-readable storage medium having computer-readable instructions stored thereon, which, when executed by a processor, cause the processor to perform the method described above.

[0023] Another aspect of this disclosure provides a computer program that, when executed by a processor, causes the processor to implement the method described above.

[0024] Another aspect of this disclosure provides an electronic device, including a plurality of light-emitting units arranged in a matrix shape, an image processing unit, and a light-emitting control unit. The image processing unit is used to perform the method described above to obtain a dot matrix image, and the light-emitting control unit is used to control the plurality of light-emitting units to emit light based on information from the dot matrix image.

[0025] According to the embodiments of this disclosure, each dot in the dot matrix corresponds to a light-emitting unit. The light-emitting control unit controls the corresponding light-emitting unit to not emit light by identifying the dots in the dot matrix used to identify the background area, and controls the corresponding light-emitting unit to emit light by identifying the dots in the dot matrix used to identify the foreground area.

[0026] According to an embodiment of this disclosure, the light-emitting control unit is used to control the playback of multiple dot matrix images to form an animation effect.

[0027] According to the technical solution of the present disclosure, by converting the target image into a bitmap, the image content can be displayed through the bitmap. Less information is needed to record the bitmap, which reduces the pressure on image data transmission and display. Bitmaps have low hardware requirements for the display, reducing the possibility of hardware incompatibility. Furthermore, bitmap files can be easily extended to different platforms, resulting in low development costs. Attached Figure Description

[0028] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments, taken in conjunction with the accompanying drawings. In the drawings:

[0029] Figure 1 A flowchart illustrating an embodiment of the image processing method of this disclosure is shown schematically.

[0030] Figure 2 A schematic diagram illustrating a target image according to an embodiment of the present disclosure;

[0031] Figure 3 A schematic diagram of a dot matrix pattern illustrating an embodiment of the present disclosure;

[0032] Figure 4 A schematic diagram illustrating a target image according to another embodiment of the present disclosure;

[0033] Figure 5 A schematic diagram of a dot matrix pattern illustrating another embodiment of the present disclosure is shown.

[0034] Figure 6 This diagram schematically illustrates the interaction state of a dot matrix diagram according to an embodiment of the present disclosure.

[0035] Figure 7 The diagram illustrates the structure of a computer system suitable for implementing the image processing method of the embodiments of the present disclosure. Detailed Implementation

[0036] In the following, exemplary embodiments of the present disclosure will be described in detail with reference to the accompanying drawings to enable those skilled in the art to implement them more readily. Furthermore, for clarity, portions unrelated to the description of exemplary embodiments have been omitted from the drawings.

[0037] In this disclosure, it should be understood that terms such as “comprising” or “having” are intended to indicate the presence of features, figures, steps, behaviors, components, parts or combinations thereof disclosed in this specification, and are not intended to exclude the possibility of the presence or addition of one or more other features, figures, steps, behaviors, components, parts or combinations thereof.

[0038] It should also be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0039] This disclosure provides an image processing method, including obtaining a target image; and dividing the target image into several target regions to generate a bitmap, wherein the bitmap includes several points, and the number of points in the several target regions is the same as the number of points in the bitmap and they correspond one-to-one; for each target region, based on the pixels in the target region, determining the size of the point in the bitmap corresponding to the target region. The technical solutions provided by various embodiments of this disclosure are described in detail below with reference to the accompanying drawings.

[0040] Figure 1 A flowchart illustrating an embodiment of the image processing method of this disclosure is shown schematically.

[0041] like Figure 1 As shown, the image processing method includes operations S110 and S120.

[0042] In operation S110, the target image is obtained.

[0043] In operation S120, the target image is converted into a bitmap, which includes a plurality of points, and the bitmap represents the features of the target image by the size of the points.

[0044] According to embodiments of this disclosure, the target image can be a single image or an image frame obtained from video data. That is, the method may further include obtaining video data and obtaining the target image from the video data, wherein the target image is at least one image frame of the video data. The video data, such as an mp4 format video file, may include multiple image frames, or may be decoded into multiple image frames. For example, MediaMetadataRetriever can be used to decode the video data into frame-by-frame images and store them in frameInfos.

[0045] Figure 2 The schematic diagram illustrates a target image of an embodiment of the present disclosure, which includes a dark background and a light-colored sun pattern. Figure 2The bitmap shown represents the features of the target image through the size of the dots. By converting the target image into a bitmap format, the image content can be displayed through multiple bitmaps. The bitmap requires less information, reducing the burden on image data transmission and display. Bitmaps have low hardware requirements for displays, reducing the possibility of hardware incompatibility. Furthermore, bitmap files can be easily extended to different platforms, resulting in low development costs.

[0046] According to an embodiment of this disclosure, operation S120 may include dividing the target image into several target regions, wherein the number of the several target regions is the same as the number of several points in the bitmap and they correspond one-to-one; and for each target region, determining the size of the point in the bitmap corresponding to the target region based on the pixels in the target region.

[0047] According to embodiments of this disclosure, a target image can be divided into several target regions in various ways. For example... Figure 2 As shown, a target image can be divided into multiple square target regions of m rows and n columns using grid lines. Alternatively, the target image can also be divided into multiple target regions according to shapes such as triangles, rectangles, parallelograms, and hexagons. According to embodiments of this disclosure, before the above division process begins, boundary widths can be defined to exclude boundary regions with less significance. Since the size of the regions and the image boundaries are adjustable, the flexibility and adjustability of the raster image are ensured.

[0048] According to embodiments of this disclosure, the dot matrix image includes a plurality of dots, and the plurality of target regions correspond one-to-one with the plurality of dots in the dot matrix image. Figure 3 A schematic diagram illustrating a dot matrix pattern of an embodiment of the present disclosure is shown. Figure 3 A dot matrix pattern consists of several dots, each dot corresponding to... Figure 2 A region of the target image shown.

[0049] According to embodiments of this disclosure, for each target region, the size of the point in the bitmap corresponding to the target region is determined based on the pixels within the target region. Through the above-described technical features, the bitmap can reflect the image features of the target image through the size characteristics of the points. For example, in... Figure 3 In the image, the size of the points corresponding to the light-colored sun pattern is different from the size of the points corresponding to the dark background, thus displaying a similar effect. Figure 2 The visual effect of the sun pattern.

[0050] According to the technical solution of this disclosure, compared to the complete data of the target image, only a small number of point size parameters are stored and transmitted, without requiring grayscale or color data, to display a similar image effect. This method is applicable to various display devices, especially light-emitting modules such as LED arrays. Furthermore, due to its simple data structure, this bitmap can be easily ported to different platforms, resulting in low development costs.

[0051] According to embodiments of this disclosure, the target image can be a grayscale frame or a color frame, and the bitmap may or may not contain color information. In some embodiments, the dots in the bitmap do not contain color information, and all dots can be displayed using the same color. In this case, the grayscale information in the grayscale frame, or the color information in the color frame, can be converted into dot size information. Since the dot size is a one-dimensional variable, a color frame can be converted into a grayscale frame to determine the dot size. A color frame can be converted into a grayscale frame using a weighted average method; for example, for an RGB image, the grayscale value can be calculated using "red × 0.299 + green × 0.587 + blue × 0.114".

[0052] According to embodiments of this disclosure, target images with a significant difference between their foreground and background colors are more suitable for the methods of this disclosure. For example, a target image where the foreground color is close to black and the background color is close to white, or a target image where the foreground color is close to white and the background color is close to black.

[0053] According to embodiments of this disclosure, determining the size of a point corresponding to a target region in a bitmap may include determining whether the target region is a foreground region or a background region. If the target region is a background region, the size of the point corresponding to the target region is determined to be a first size, where the first size is a fixed value. If the target region is a foreground region, the size of the point corresponding to the target region is determined to be a second size, where the second size is different from the first size. For example, a trained artificial intelligence model, such as a neural network, especially a convolutional neural network, can be used to identify the foreground and / or background regions of the target image. Alternatively, traditional image processing techniques, such as gradient calculation, can also be used to identify the foreground and / or background regions of the target image. Or, the foreground or background region of the target image can be determined based on the grayscale information of pixels. After identification, pixels belonging to the foreground region and pixels belonging to the background region in the target image can be determined, thereby determining whether the target region is a foreground or background region. If the target region is a background region, the size of the point corresponding to the target region can be determined to be a first size, where the first size is a fixed value. If the target region is a foreground region, the size of the point corresponding to the target region can be determined to be a second size, where the second size is different from the first size.

[0054] According to embodiments of this disclosure, determining the size of a point in a bitmap corresponding to the target region based on pixels within the target region includes determining the size of the point in the bitmap corresponding to the target region based on the grayscale values ​​of pixels within the target region. Within the same bitmap, unless the target image is a solid color image or a near-solid color image, the sizes of points corresponding to different target regions are typically different. Determining the size of points in a bitmap using different grayscale values ​​can reflect the shape features contained in the target image.

[0055] For example, Figure 2 The pixels in the dark background area have lower grayscale values, while the pixels in the light foreground area (the part of the sun pattern) have higher grayscale values. A grayscale threshold can be set to distinguish between the foreground and background areas. (Background area corresponds to...) Figure 3 In a bitmap, all dots are small dots of the same size; that is, the first dimension can be a relatively small dimension. Figure 3 In a bitmap, the dots are larger than other smaller dots; that is, the second dimension can be a larger size. It can be understood that as long as the foreground and background dots are of different sizes, the visual effect of a pattern in the target image can be displayed. Therefore, the second dimension can also be smaller than the first dimension.

[0056] According to embodiments of this disclosure, a dot can be a circle or other shapes. In embodiments with a circle, the size of the dot can be a radius or a diameter.

[0057] According to embodiments of this disclosure, the size of all or some points can be recorded in a bitmap. Since the size of points corresponding to the background area is consistent, the bitmap can record only the size and position of points corresponding to the foreground area. For example, (4,8,30,6) can represent that the size of the point at coordinate (4,8) is 30.6px. Furthermore, since the number of pixels is limited, the two-dimensional coordinates can be converted into one-dimensional coordinates according to certain rules. For example, (140,30.6) represents that the size of the point at the 140th position is 30.6px. The above is an example of a 17×17 pixel target area. 140 corresponds to x = 140 ÷ 17 = 4, and y = 140 / 17 = 8. The two-dimensional coordinates of the top left corner of the image are (0,0), and 140 represents the position of the 5th cell to the right and the 9th cell down from the top left corner. This can further reduce the amount of data in the bitmap.

[0058] According to embodiments of this disclosure, the second dimensions corresponding to different target regions in the target region of the foreground region are the same or different. Figure 3 In the dot matrix diagram shown, the size of the dots corresponding to the foreground region of the sun pattern is the second size, and these dots are all the same size. In other embodiments of this disclosure, the second size corresponding to different target regions within the target region of the foreground region may also be different, thereby enabling the representation of more information in the target image.

[0059] According to embodiments of this disclosure, determining whether a target region is a foreground or background region based on the grayscale values ​​of pixels within the target region may include determining whether the target region is a foreground or background region based on the grayscale value of the center pixel of the target region. For example, a target region may contain 9×9 pixels, then the center pixel is the pixel in the 5th row and 5th column of the target region. This center pixel can serve as a representative of the target region to determine whether the target region as a whole belongs to the foreground or background region. For example, when the background is black and the foreground is white, if the grayscale value of the center pixel is 255, i.e., white, then the target region can be determined to be a foreground region.

[0060] According to embodiments of this disclosure, determining whether a target region is a foreground or background region based on the grayscale values ​​of pixels within the target region may also include determining whether the target region is a foreground or background region based on the average grayscale values ​​of the pixels within the target region. For example, for a target region with 9×9 pixels, the average grayscale value of these 81 pixels can be determined to identify the target region as a foreground or background region. Assuming that there are 72 pixels with a grayscale value of 255 (i.e., white) and 9 pixels with a grayscale value of 0 (i.e., black), the average value can be determined to be (255×72+0×9) / 81=227. In the case of a black background and a white foreground, the grayscale threshold determines that it is closer to the foreground color 255, thus identifying the entire target region as a foreground region. The specific setting of the grayscale threshold can be determined in advance based on a certain number of experiments.

[0061] According to embodiments of this disclosure, determining whether a target region is a foreground or background region based on the grayscale values ​​of pixels within the target region may also include: comparing the grayscale value of each pixel within the target region with a grayscale threshold to determine the number of pixels with grayscale values ​​greater than the grayscale threshold; determining the ratio of the number of pixels with grayscale values ​​greater than the grayscale threshold to the total number of pixels in the target region; and determining whether the target region is a foreground or background region based on a comparison of the ratio with a proportional threshold. For example, when the background is black and the foreground is white, the grayscale threshold may be set to 60. For the grayscale values ​​of 81 pixels in a 9*9 target region, each is compared with the grayscale threshold to obtain the comparison results. Assuming that 63 pixels out of the 81 pixels have grayscale values ​​greater than 60 and 18 pixels have grayscale values ​​less than 60, the ratio of the number of pixels with grayscale values ​​greater than the grayscale threshold to the total number of pixels in the target region can be calculated as 63 / 81 = 78%. This ratio is compared with a proportional threshold, for example, 30%. Since 78% > 30%, the target region is determined to be a foreground region. As an equivalent method, the ratio of the number of pixels with gray values ​​less than the gray value threshold to the total number of pixels in the target area can also be determined and compared with the ratio threshold.

[0062] According to embodiments of this disclosure, the three methods for determining the foreground or background region described above can be used individually or in combination. For example, the average pixel value can be considered while considering the center pixel; or the pixel count ratio can be considered while considering the center pixel or the average pixel value. When using two or three determination methods, a logical AND operation can be used for determination, or each result can be assigned a weight and the final determination result can be calculated by weighted average. For example, when the background is black and the foreground is white, after initially determining the target region as the foreground region based on the center pixel, if the ratio of the number of pixels with a grayscale value greater than the grayscale threshold to the total number of pixels in the target region is less than the proportion threshold, then the target region is considered not to belong to the foreground region. In this example, a logical AND operation is used to combine two determination methods, which can also be understood as using the proportion of pixels as an exclusion condition for the initial determination result, excluding the region from being determined as the foreground region.

[0063] According to embodiments of this disclosure, when the target region is a foreground region, the size of the points corresponding to the target region in the bitmap is positively or negatively correlated with the feature grayscale value, where the feature grayscale value is the grayscale value of the center pixel of the target region or the average grayscale value of the pixels in the target region. According to embodiments of this disclosure, the grayscale difference between the background region and the foreground region can be positively correlated with the size difference; that is, the greater the grayscale difference between the background region and the foreground region, the greater the size difference, and vice versa. For example, if the points in the bitmap corresponding to the background region are small and the background is black, then the higher the feature grayscale value of the foreground region (the closer it is to white), the larger the size of the corresponding points. This allows more information in the target image to be represented, ensuring the accuracy and visual effect of the bitmap.

[0064] Figure 4 A schematic diagram illustrating a target image according to another embodiment of this disclosure. Figure 5 A schematic diagram of a dot matrix pattern illustrating another embodiment of this disclosure is shown. Figure 4 As shown, the target image has a dark background and a light foreground. The feature grayscale values ​​of multiple foreground regions decrease from left to right, which could be a frame from a video showing a white dot moving from right to left. Figure 4 The raster image obtained by converting the target image is as follows: Figure 5 As shown, the size of the points corresponding to the background area is a smaller first size, and the size of the points corresponding to the foreground area is a larger second size. However, the second sizes are not the same, and the brighter the target area, the larger the size of the points.

[0065] As mentioned above, in addition to the grayscale-based bitmap conversion method, other image processing techniques can also be used to identify foreground and background regions for bitmap conversion.

[0066] According to an embodiment of this disclosure, determining the size of a point in a bitmap corresponding to the target region based on pixels within the target region includes: identifying a background region of the target image; determining whether the target region is a foreground region or a background region based on the proportion of pixels belonging to the background region within the target region; and determining the size of a point in a bitmap corresponding to the target region based on whether the target region is a foreground region or a background region, wherein the background region corresponds to a fixed first size, and the foreground region corresponds to a fixed or variable second size, the second size being greater than or less than the first size.

[0067] For example, trained artificial intelligence models, such as neural networks, especially convolutional neural networks, can be used to identify foreground and / or background regions of a target image. Alternatively, traditional image processing techniques, such as gradient calculation, can also be used to identify foreground and / or background regions of a target image. After identification, the pixels belonging to the foreground and background regions in the target image can be determined. For each target region, the proportion of pixels belonging to the foreground or background region can be calculated, and a threshold value can be used to determine whether the target region is foreground or background. The size of the corresponding points can then be determined based on whether the target region is foreground or background.

[0068] According to embodiments of this disclosure, the image processing method further includes saving or sending bitmaps. The device performing the image processing method in these embodiments may or may not have a display unit. For example, the image processing method can be applied to a server. After converting video data into multiple bitmaps, the server can save the bitmaps for use when needed, or send them to a device with a display unit for display. A device with a display unit can be, for example, a terminal device such as a mobile phone or personal computer. The image processing method can also be applied to a terminal device. After converting video data into multiple bitmaps, the terminal device can save, share, display, or display animations based on multiple bitmaps locally or in the cloud. For example, the terminal device can read a JSON file and parse its information, draw bitmaps using canvas.drawCircle, and assemble the bitmaps into an animation using AnimationDrawable.

[0069] According to embodiments of this disclosure, the bitmap can be saved as a JSON file, which records various information about the converted video data, such as the image's width and height, boundaries, number of frames, foreground and background colors, and the coordinates and size of the foreground points. The JSON file not only runs well on the Android platform but can also be easily ported to other platforms, such as iOS. Therefore, this approach facilitates cross-platform development and enables the conversion of video into bitmap animation, thus providing users with a wider range of experiences. An example video data size is 2.4Mb, while the converted JSON file is only 316.2kb, saving storage, computation, and transmission resources.

[0070] The dot matrix display of this disclosure can support user interaction to improve user experience. According to this disclosure, when displaying a dot matrix or dot matrix animation, the image processing method may further include receiving user input on a touchscreen, determining multiple target points around the location touched by the user, and displaying a change effect based on the multiple target points. Figure 6 This diagram schematically illustrates the interactive states of a dot matrix diagram according to an embodiment of the present disclosure. Figure 3 Based on the dot matrix pattern of the sun shown, interactive effects can be displayed when the user touches the screen or even slides their finger across the screen. Figure 6 The image shows the state at a certain moment during the change of the interactive effect.

[0071] According to embodiments of this disclosure, when the target area is a background area, the target point has a first size; when the target area is a foreground area, the target point has a second size, where the second size is larger than the first size. The display of a changing effect based on the plurality of target points includes: when the area corresponding to the target point is a background area, the size of the target point gradually changes from a third size to the first size, where the third size is larger than the first size; or, when the area corresponding to the target point is a foreground area, the size of the target point gradually changes from a fourth size to the second size, where the fourth size is smaller than the second size. That is, when the user slides over a larger size point, the point gradually increases in size until it returns to its previous size; when the user slides over a smaller size point, the point gradually decreases in size until it returns to its previous size. In some embodiments, the radius of the shrinking radius can first decrease to 0 and then increase to its previous size.

[0072] According to embodiments of this disclosure, the step of displaying a change effect based on the plurality of target points includes: if a target point is not in the animation list, adding the target point to the animation list and starting a point animation, in which the size of the target point changes continuously, and removing the target point from the animation list after the point animation ends. For example, a terminal device can record the finger swipe position through onTouchEvent to capture the trajectory of the finger swipe. Expanding outwards from the coordinates of the finger's pressing point, the coordinates of these newly added points are recorded in the animation list. Each time the finger swipes, only points not yet in the animation list are added. The point in the animation list is removed only after the animation effect of the point in the animation list has ended, thus achieving a better visual effect.

[0073] Another aspect of this disclosure provides an electronic device including a plurality of light-emitting units arranged in a matrix, an image processing unit, and a light-emitting control unit. The image processing unit performs the method described above to obtain a dot matrix image, and the light-emitting control unit controls the plurality of light-emitting units to emit light based on information from the dot matrix image. For example, the electronic device may be an LED light array, or other devices including an LED light array, such as a mobile phone including an LED light array. One side of the mobile phone has a screen, and the side opposite the screen, usually referred to as the back, may have an LED light array. The mobile phone can utilize the LED light array on the back to display dot matrix animations, enriching the phone's functionality and improving the user experience.

[0074] According to embodiments of this disclosure, each dot in the dot matrix corresponds one-to-one with a light-emitting unit. The light-emitting control unit controls the corresponding light-emitting unit to not emit light by identifying dots in the dot matrix used to identify background areas, and controls the corresponding light-emitting unit to emit light by identifying dots in the dot matrix used to identify foreground areas. Figure 3 For example, Figure 3 Each dot in the dot matrix diagram corresponds to a light-emitting unit, such as an LED. The portion shown in the sun pattern is the foreground, where the corresponding LED emits light; the other portions are the background, where the corresponding LEDs do not emit light. Thus, various shapes in the target image of video data can be displayed using a light-emitting array.

[0075] According to an embodiment of this disclosure, the light-emitting control unit is used to control the playback of multiple dot matrix images to create an animation effect. When playing the lighting effects corresponding to multiple dot matrix images continuously, the display time of each dot matrix image is, for example, 0.2 seconds, thereby creating a continuous animation effect, displaying richer content, and improving the user experience.

[0076] Figure 7 The diagram illustrates the structure of a computer system suitable for implementing the image processing method of the embodiments of the present disclosure.

[0077] like Figure 7 As shown, the computer system 700 includes a processor 701, which can execute various processes described in the above embodiments according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage section 708 into a random access memory (RAM) 703. The RAM 703 also stores various programs and data required for the operation of the computer system 700. The processor 701, ROM 702, and RAM 703 are interconnected via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.

[0078] The following components are connected to I / O interface 705: an input section 706 including a keyboard, mouse, etc.; an output section 707 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 708 including a hard disk, etc.; and a communication section 709 including a network interface card such as a LAN card, modem, etc. The communication section 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to I / O interface 705 as needed. A removable medium 711, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., is installed on drive 710 as needed so that computer programs read from it can be installed into storage section 708 as needed. The processor 701 can be implemented as a processing unit such as a CPU, GPU, TPU, FPGA, NPU, etc.

[0079] In particular, according to embodiments of this disclosure, the methods described above can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program containing program code for performing the methods described above. In such embodiments, the computer program can be downloaded and installed from a network via communication section 709, and / or installed from removable medium 711.

[0080] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0081] The units or modules described in the embodiments of this disclosure can be implemented in software or programmable hardware. The described units or modules can also be located in a processor, and the names of these units or modules do not necessarily constitute a limitation on the unit or module itself.

[0082] In another aspect, this disclosure also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the electronic device or computer system described above; or it may be a standalone computer-readable storage medium not assembled into a device. The computer-readable storage medium stores one or more programs, which are used by one or more processors to execute the methods of the embodiments of this disclosure.

[0083] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features disclosed in this disclosure that have similar functions.

Claims

1. An image processing method, characterized in that, include: Obtain the target image; The target image is converted into a bitmap, which includes a plurality of dots, and the bitmap represents the features of the target image by the size of the dots.

2. The method according to claim 1, characterized in that, The step of converting the target image into a raster image includes: The target image is divided into several target regions, and the number of the several target regions is the same as the number of points in the bitmap and they correspond one-to-one. For each target region, the size of the point in the bitmap corresponding to the target region is determined based on the pixels within the target region.

3. The method according to claim 2, characterized in that, The target image is a grayscale frame, or the method further includes converting the target image to a grayscale frame if the target image is a color frame; Determining the size of the point in the bitmap corresponding to the target region based on the pixels within the target region includes: Based on the grayscale values ​​of the pixels within the target area, the size of the point in the bitmap corresponding to the target area is determined.

4. The method according to claim 2, characterized in that, Determining the size of the point in the dot matrix corresponding to the target region includes: The target region is determined to be either a foreground region or a background region; When the target region is a background region, the size of the point corresponding to the target region is determined as a first size, wherein the first size is a fixed value; and When the target region is a foreground region, the size of the point corresponding to the target region is determined as a second size, wherein the second size is different from the first size, and the second size corresponding to different target regions in the target region of the foreground region is the same or different.

5. The method according to claim 4, characterized in that, Determining the target region as a foreground region or a background region includes determining the target region as a foreground region or a background region based on the grayscale values ​​of the pixels within the target region, wherein: Based on the grayscale value of the center pixel of the target region, the target region is determined to be either a foreground region or a background region; or Based on the average grayscale value of the pixels in the target region, the target region is determined to be either a foreground region or a background region.

6. The method according to claim 4, characterized in that, Determining the target region as a foreground region or a background region includes: The grayscale value of each pixel within the target area is compared with a grayscale threshold to determine the number of pixels whose grayscale value is greater than the grayscale threshold. Determine the ratio of the number of pixels with gray values ​​greater than a gray threshold to the total number of pixels in the target area; Based on the comparison between the ratio and the ratio threshold, the target region is determined to be either a foreground region or a background region.

7. The method according to claim 4, characterized in that, When the target region is a foreground region, the size of the point corresponding to the target region in the bitmap is positively or negatively correlated with the feature gray value, wherein the feature gray value is the gray value of the center pixel of the target region or the average gray value of the pixels in the target region.

8. The method according to claim 2, characterized in that, Determining the size of the point in the bitmap corresponding to the target region based on the pixels within the target region includes: Identify the background region of the target image; The target region is determined to be either a foreground region or a background region based on the proportion of pixels belonging to the background region within the target region. Based on whether the target region is a foreground region or a background region, the size of the point in the bitmap corresponding to the target region is determined, wherein the background region corresponds to a fixed first size, and the foreground region corresponds to a fixed or variable second size, wherein the second size is greater than or less than the first size.

9. The method according to any one of claims 1-8, characterized in that, Also includes: Obtain video data; The target image is obtained from the video data, wherein the target image is at least one image frame of the video data.

10. The method according to any one of claims 1-8, characterized in that, Also includes: Save or send the bitmap; or Animation is displayed based on multiple bitmaps.

11. The method according to any one of claims 1-8, characterized in that, Also includes: Receive user input on the touchscreen and determine multiple target points around the location where the user touches; The effects of the changes are displayed based on the multiple target points.

12. The method according to claim 11, characterized in that, When the target area is a background area, the target point has a first size; when the target area is a foreground area, the target point has a second size, where the second size is larger than the first size. The display of the change effect based on the multiple target points includes: When the area corresponding to the target point is a background area, the size of the target point gradually changes from a third size to a first size, wherein the third size is larger than the first size; or When the area corresponding to the target point is a foreground area, the size of the target point gradually changes from the fourth size to the second size, and the fourth size is smaller than the second size.

13. The method according to claim 11, characterized in that, The process of displaying the change effect based on the multiple target points includes: If the target point is not in the animation list, then the target point is added to the animation list and the point animation is started. In the point animation, the size of the target point changes continuously. After the point animation ends, the target point is removed from the animation list.

14. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1-13.

15. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by a processor, cause the processor to perform the method as described in any one of claims 1-13.

16. An electronic device, characterized in that, include: Multiple light-emitting units arranged in a matrix shape; An image processing unit is configured to perform the method as described in any one of claims 1-13 to obtain a bitmap; A light-emitting control unit is used to control the light emission of the plurality of light-emitting units based on the information of the dot matrix.

17. The electronic device according to claim 16, characterized in that, The dots in the dot matrix correspond one-to-one with the light-emitting units. The light-emitting control unit controls the corresponding light-emitting units to not emit light by identifying the dots in the dot matrix used to identify the background area, and controls the corresponding light-emitting units to emit light by identifying the dots in the dot matrix used to identify the foreground area.

18. The electronic device according to claim 16, characterized in that, The light-emitting control unit is used to control the playback of multiple dot matrix images to create an animation effect.