Compression method of black-and-white picture, and electronic device and storage medium
By marking a small number of pixels in a black and white image and recording their position and encoding information, a compressed file is generated, solving the problem of slow Bluetooth transmission speed and achieving significant compression of image size and reduction of transmission time.
Patent Information
- Application Number
- CN202111303914.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-05
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2041-11-05
Smart Images

Figure CN114143544B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the field of picture compression processing, and particularly relates to a black-and-white picture compression method, an electronic device and a storage medium. BACKGROUND
[0002] In the navigation scene of a vehicle-mounted intelligent robot, a road intersection enlarged picture is generated by a mobile phone and transmitted to the vehicle-mounted robot through BLE. The transmission speed of Bluetooth is very slow, and the picture cannot be normally transmitted. The size of the black-and-white picture can be greatly compressed by the scheme, the transmission time is reduced, and the user has a better experience.
[0003] In summary, the prior art has the following technical problems:
[0004] In the navigation scene of a vehicle-mounted intelligent robot, a road intersection enlarged picture is generated by a mobile phone and transmitted to the vehicle-mounted robot through Bluetooth. However, the transmission speed of Bluetooth is very slow, and the picture cannot be normally transmitted. SUMMARY
[0005] To solve the above technical problems, the present application provides a black-and-white picture compression method, comprising the steps of:
[0006] An original picture is obtained, and one of the two kinds of pixels with a smaller number is marked;
[0007] The position information of all the marked pixels is recorded as (x, y);
[0008] The encoding position information of an original marked pixel and the remaining marked pixels is determined;
[0009] The pixel value, position information and encoding position information are saved to obtain a compressed file.
[0010] Preferably, the original picture is obtained, and one of the two kinds of pixels with a smaller number is marked, comprising:
[0011] The original picture is traversed to obtain all the pixels;
[0012] The obtained pixels are divided into black pixels and white pixels according to different pixel values;
[0013] The number of the two kinds of pixels is compared;
[0014] According to the comparison result, one kind of pixel with a smaller number is marked.
[0015] Preferably, the position information of all the marked pixels is recorded as (x, y), comprising:
[0016] The position of the original pixel at the lower left corner of the picture is taken as the origin (0, 0).
[0017] An original pixel point is marked as an original unit distance, a straight line of a lowermost row of pixel points to the right of the original pixel point is taken as a positive direction of an x-axis of a coordinate axis, and a straight line of a leftmost row of pixel points above the original pixel point is taken as a positive direction of a y-axis of the coordinate axis.
[0018] Based on the coordinate system, positions of all the marked pixel points are obtained as (x, y).
[0019] Preferably, the determination of the encoding position information of the original marked pixel point and the remaining marked pixel points comprises:
[0020] Pixel point numbers a and b of the original picture length and width are obtained to obtain position information (a / 2, b / 2) of a central pixel point of the original picture.
[0021] The position information (x, y) of all the marked pixel points is compared with the position information (a / 2, b / 2) of the central pixel point to obtain a closest marked pixel point as the original marked pixel point.
[0022] The position information of the original marked pixel point is recorded as a second origin (x0, y0).
[0023] The position difference of the remaining marked pixel points from the second origin is taken as the encoding position information of the marked pixel point.
[0024] Preferably, the saving of the pixel value, the position information and the encoding position information to obtain a compressed file comprises:
[0025] The pixel value and the position information of all the unmarked pixel points, the pixel value and the position information of the original marked pixel point, and the encoding position information of the remaining marked pixel points are saved.
[0026] Preferably, the transmission mode of the compressed file includes one or more transmission modes, but is not limited to Bluetooth transmission.
[0027] Preferably, the decompression mode of the compressed file comprises:
[0028] The pixel value and the position information of the original marked pixel point in the compressed file and the encoding position information of the remaining marked pixel points are obtained.
[0029] The position information of the remaining marked pixel points is obtained by adding the encoding position information of the remaining marked pixel points to the position information of the original marked pixel point.
[0030] The pixel value and the position information of all the unmarked pixel points are combined with the obtained position information of the marked pixel points and the pixel value of the original marked pixel point to obtain the original picture.
[0031] A black and white picture compression device, comprising:
[0032] A pixel point marking module, obtaining an original picture, marking one of the two kinds of pixel points with less quantity;
[0033] A position information recording module, recording the position information of all marked pixel points as (x, y);
[0034] A position information encoding module, determining the encoding position information of one original marked pixel point and the remaining marked pixel points;
[0035] A compression module, saving the pixel value, position information and encoding position information to obtain a compressed file.
[0036] Preferably, the pixel point marking module comprises:
[0037] A pixel point counting unit for obtaining an original picture for traversal to obtain all pixel points;
[0038] A pixel point classification unit for classifying the obtained pixel points into black pixel points and white pixel points according to different pixel values;
[0039] A pixel point comparison unit for comparing the quantities of the two kinds of pixel points;
[0040] A pixel point marking unit for marking one of the pixel points with less quantity according to the comparison result.
[0041] Preferably, the position information recording module is used for:
[0042] Taking the position of the original pixel point at the lower left corner of the picture as the origin (0, 0);
[0043] Establishing a coordinate system with the origin (0, 0), marking the original pixel point as an original unit distance, taking the straight line of the rightmost lowermost pixel point as the positive direction of the x-axis of the coordinate axis, and taking the straight line of the uppermost leftmost pixel point as the positive direction of the y-axis of the coordinate axis;
[0044] Based on the coordinate system, obtaining the positions of all marked pixel points as (x, y).
[0045] Preferably, the position information encoding module comprises:
[0046] A center pixel point obtaining unit for obtaining the pixel point quantities a and b of the length and width of the original picture to obtain the position information (a / 2, b / 2) of the center pixel point of the original picture;
[0047] An original mark pixel point acquisition unit is configured to compare position information (x, y) of all mark pixel points with position information (a / 2, b / 2) of the center pixel point, and obtain the closest mark pixel point as an original mark pixel point;
[0048] An original mark pixel point recording unit is configured to record position information of the original mark pixel point as a second origin (x0, y0).
[0049] An encoding unit is configured to calculate a position difference between the remaining mark pixel points and the second origin as encoding position information of the mark pixel point.
[0050] Preferably, the compression module is configured to save pixel values and position information of all unmarked pixel points, pixel values and position information of the original mark pixel point, and encoding position information of the remaining mark pixel points.
[0051] Preferably, the black-and-white picture compression device further comprises a transmission module configured to transmit a compressed file, wherein the transmission mode of the compressed file comprises one or more transmission modes, but is not limited to Bluetooth transmission.
[0052] Preferably, the black-and-white picture compression device further comprises a decompression module, which comprises:
[0053] An information reading unit is configured to obtain pixel values and position information of the original mark pixel point and encoding position information of the remaining mark pixel point in the compressed file.
[0054] An information inverse calculation unit is configured to obtain position information of the remaining mark pixel point by adding the encoding position information of the remaining mark pixel point to the position information of the original mark pixel point.
[0055] A decompression restoration unit is configured to obtain the original picture by combining pixel values and position information of all unmarked pixel points, position information of the obtained mark pixel point, and pixel values of the original mark pixel point.
[0056] An electronic device comprises a memory and a processor, and the memory stores a computer program, wherein the computer program is executed in the processor to realize the method of any one of the above.
[0057] A storage medium stores a computer program, wherein the computer program is executed in a processor to realize the method of any one of the above.
[0058] The application extracts feature values of black and white, traverses picture pixel information, records pixel position points of pixel values (black or white) with less comparison, stores position information of less pixel points through encoding, filters out unnecessary pixel information, only stores single pixel position information, as much as possible to reduce the size of the picture, and realizes the technical effect of greatly compressing the size of the black-and-white picture. Attached Figure Description
[0059] Figure 1 This is a flowchart illustrating the black-and-white image compression method of this application. Detailed Implementation
[0060] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0061] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0062] In this application, the terms "upper," "lower," "left," "right," "front," "rear," "top," "bottom," "inner," "outer," "middle," "vertical," "horizontal," "lateral," and "longitudinal" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. These terms are primarily for the purpose of better describing the invention and its embodiments, and are not intended to limit the indicated system, element, or component to having a specific orientation, or to be constructed and operated in a specific orientation.
[0063] Furthermore, in addition to indicating direction or positional relationship, some of the aforementioned terms may also have other meanings. For example, the term "above" may also be used in certain situations to indicate a dependency or connection. Those skilled in the art can understand the specific meaning of these terms in this invention based on the specific circumstances.
[0064] In addition, the terms "mounting", "arrangement", "provided with", "connection", "connected", "sleeved" should be understood broadly. For example, it can be fixed connection, detachable connection, or integral structure; it can be mechanical connection, or electrical connection; it can be direct connection, or indirect connection through intermediate medium, or internal communication between two systems, elements or components. The specific meaning of the above terms in the present application can be understood according to the specific circumstances by those skilled in the art.
[0065] It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict. It should be understood that in the description of the present application, unless otherwise specified and limited, the term "storage medium" can be various storage media that can store computer programs, such as ROM, RAM, magnetic disk, or optical disk. The term "processor" can be a chip or circuit with data processing function, such as CPLD (Complex Programmable Logic Device), FPGA (Field-Programmable Gate Array), MCU (Microcontroller Unit), PLC (Programmable Logic Controller), and CPU (Central Processing Unit). The term "electronic device" can be any device with data processing function and storage function, which can generally include fixed terminals and mobile terminals. Fixed terminals are, for example, desktop computers. Mobile terminals are, for example, mobile phones, PADs, and mobile robots. In addition, the technical features involved in the different embodiments of the present application described later can be combined with each other as long as there is no conflict.
[0066] In the following, the present application proposes some preferred embodiments to teach those skilled in the art to implement, which will be described in detail with reference to the accompanying drawings and in combination with the embodiments.
[0067] Embodiment one
[0068] The present embodiment provides a compression method for black and white pictures, as shown in the following steps: Figure 1
[0069] S100, obtaining an original picture, and marking the one with less quantity among the two kinds of pixel points;
[0070] S200, recording the position information (x, y) of all marked pixel points;
[0071] S300, determining the encoding position information of one original marked pixel point and the remaining marked pixel points;
[0072] S400, save the pixel value, position information and encoding position information to obtain a compressed file.
[0073] In a further embodiment, the original picture is obtained, and one of the two types of pixels with a smaller number is marked.
[0074] S110, obtaining an original picture to traverse and obtain all pixel points;
[0075] S120, dividing the obtained pixel points into black pixel points and white pixel points according to different pixel values;
[0076] S130, comparing the number of the two types of pixel points;
[0077] S140, according to the comparison result, marking one of the pixel points with a smaller number.
[0078] In a further embodiment, the position information of all marked pixel points is recorded as (x, y), comprising:
[0079] S210, taking the position of the original pixel point at the lower left corner of the picture as the origin (0, 0);
[0080] S220, establishing a coordinate system with the origin (0, 0), marking the original pixel point as an original unit distance, taking the straight line of the rightmost lower row pixel point of the pixel point where the origin is located as the positive direction of the x-axis of the coordinate axis, and taking the straight line of the uppermost left row pixel point of the pixel point where the origin is located as the positive direction of the y-axis of the coordinate axis;
[0081] S230, based on the coordinate system, obtaining the position of all marked pixel points as (x, y).
[0082] In a further embodiment, the encoding position information of one original marked pixel point and the remaining marked pixel points is determined, comprising:
[0083] S310, obtaining the pixel point number a, b of the length and width of the original picture to obtain the position information (a / 2, b / 2) of the central pixel point of the original picture;
[0084] S320, comparing the position information (x, y) of all marked pixel points with the position information (a / 2, b / 2) of the central pixel point to obtain the closest marked pixel point as the original marked pixel point;
[0085] S330, recording the position information of the original marked pixel point as the second origin (x0, y0);
[0086] S340, calculating the position difference of the remaining marked pixel points and the second origin as the encoding position information of the marked pixel point.
[0087] In a further embodiment, the saving of the pixel value, position information and encoded position information obtains a compressed file, comprising:
[0088] Saving the pixel value and position information of all unmarked pixel points, the pixel value and position information of original marked pixel points, and the encoded position information of the remaining marked pixel points.
[0089] In a further embodiment, the transmission mode of the compressed file includes one or more transmission modes, but is not limited to Bluetooth transmission.
[0090] In a further embodiment, the decompression mode of the compressed file includes:
[0091] S500, obtaining the pixel value and position information of the original marked pixel points and the encoded position information of the remaining marked pixel points in the compressed file;
[0092] S600, obtaining the position information of the remaining marked pixel points by adding the encoded position information of the remaining marked pixel points to the position information of the original marked pixel points;
[0093] S700, obtaining the pixel value and position information of all unmarked pixel points and combining the obtained position information of the marked pixel points and the pixel value of the original marked pixel points to obtain the original picture.
[0094] From the above description, it can be seen that the present application achieves the following technical effects:
[0095] The method of extracting black and white characteristic values is used to traverse the pixel information of the picture, record the pixel position of the pixel value (black or white) with less pixel points, store the position information of the less pixel points through encoding, filter out the unnecessary pixel information, only store the single pixel position information, as much as possible to reduce the size of the picture, and realize the technical effect of greatly compressing the size of the black and white picture.
[0096] Embodiment two
[0097] In this embodiment, a black and white picture compression device is provided, comprising:
[0098] The pixel point marking module obtains an original picture to obtain one of the two kinds of pixel points with less quantity to be marked;
[0099] The position information recording module records the position information of all marked pixel points as (x, y);
[0100] The position information encoding module determines the encoded position information of an original marked pixel point and the remaining marked pixel points.
[0101] A compression module saves pixel values, position information and encoded position information to obtain a compressed file.
[0102] In a further embodiment, the pixel point marking module comprises:
[0103] A pixel point counting unit is configured to obtain all pixel points by traversing the original picture.
[0104] A pixel point classification unit is configured to divide the obtained pixel points into black pixel points and white pixel points according to different pixel values.
[0105] A pixel point comparison unit is configured to compare the number of the two kinds of pixel points.
[0106] A pixel point marking unit is configured to mark the pixel points of the kind with fewer pixel points according to the comparison result.
[0107] In a further embodiment, the position information recording module is configured to:
[0108] The position of the original pixel point at the lower left corner of the picture is taken as the origin (0, 0).
[0109] A coordinate system is established with the origin (0, 0), the original pixel point is marked as an original unit distance, the straight line of the pixel point at the right of the origin and the lowermost row of pixel points is taken as the positive direction of the x-axis of the coordinate axis, and the straight line of the pixel point above the origin and the leftmost row of pixel points is taken as the positive direction of the y-axis of the coordinate axis.
[0110] Based on the coordinate system, the positions of all the marked pixel points are obtained as (x, y).
[0111] In a further embodiment, the position information encoding module comprises:
[0112] A center pixel point obtaining unit is configured to obtain the pixel point numbers a and b of the original picture in length and width to obtain the position information (a / 2, b / 2) of the center pixel point of the original picture.
[0113] An original marked pixel point obtaining unit is configured to compare the position information (x, y) of all the marked pixel points with the position information (a / 2, b / 2) of the center pixel point to obtain the closest marked pixel point as the original marked pixel point.
[0114] An original marked pixel point recording unit is configured to record the position information of the original marked pixel point as the second origin (x0, y0).
[0115] An encoding unit is configured to calculate the position difference between the remaining marked pixel points and the second origin as the encoded position information of the marked pixel point.
[0116] In a further embodiment, the compression module is configured to store the pixel values and position information of all unmarked pixel points, the pixel values and position information of the original marked pixel points, and the encoded position information of the remaining marked pixel points.
[0117] In a further embodiment, the compression device for black-and-white pictures further comprises a transmission module configured to transmit the compressed file, wherein the transmission mode of the compressed file comprises one or more transmission modes, including but not limited to Bluetooth transmission.
[0118] In a further embodiment, the compression device further comprises a decompression module, which comprises:
[0119] an information reading unit configured to obtain the pixel values and position information of the original marked pixel points and the encoded position information of the remaining marked pixel points in the compressed file;
[0120] an information inverse calculation unit configured to obtain the position information of the remaining marked pixel points by adding the encoded position information of the remaining marked pixel points to the position information of the original marked pixel points;
[0121] a decompression restoration unit configured to obtain the original picture by combining the pixel values and position information of all unmarked pixel points with the position information of the marked pixel points and the pixel values of the original marked pixel points.
[0122] Embodiment Three
[0123] The embodiment of the present application further comprises an electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the computer program is configured to implement the above-mentioned compression method for black-and-white pictures when executed in the processor, and the method comprises:
[0124] S100, obtaining an original picture to obtain one of the two types of pixels with a smaller number to be marked;
[0125] S200, recording the position information of all marked pixel points as (x, y);
[0126] S300, determining an original marked pixel point and the encoded position information of the remaining marked pixel points;
[0127] S400, storing the pixel values, position information, and encoded position information to obtain a compressed file.
[0128] Embodiment Four
[0129] In this embodiment, the present application further provides a readable storage medium, wherein the readable storage medium stores a computer program, and the computer program is configured to implement the above-mentioned compression method for black-and-white pictures when executed by a processor, and the method comprises:
[0130] S100, obtaining an original picture, and marking a kind of pixel point with less quantity in black and white two kinds of pixel points;
[0131] S200, recording position information of all marked pixel points as (x, y);
[0132] S300, determining encoding position information of a marked pixel point and the rest marked pixel points;
[0133] S400, saving pixel value, position information and encoding position information, and obtaining a compressed file.
[0134] The readable storage medium can be a computer storage medium or a communication medium. The communication medium includes any medium that facilitates transfer of a computer program from one place to another. The computer storage medium can be any available medium that can be accessed by a general or special purpose computer. For example, the readable storage medium is coupled to the processor, so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be an integral part of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (ASIC). In addition, the ASIC can be located in a user equipment. Of course, the processor and the readable storage medium can also exist as discrete components in a communication device. The readable storage medium can be a read only memory (ROM), a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk and an optical data storage device, etc.
[0135] The application also provides a program product, which includes execution instructions stored in a readable storage medium. At least an original processor of a device can read the execution instructions from the readable storage medium, and the at least original processor executes the execution instructions so that the device implements the method provided by various embodiments described above.
[0136] In the above-mentioned embodiments of the terminal or the server, it should be understood that the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), etc. The general-purpose processor can be a microprocessor, or the processor can also be any conventional processor, etc. The steps of the method disclosed in the application can be directly embodied as execution completed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0137] It is noted that the steps illustrated in the flowchart of the figure can be performed in a computer system such as a set of computer executable instructions executed by a computer system and while the logical flow of the steps is shown in the order they are performed, in some cases, the steps shown or described can be performed in a different order than shown or described.
[0138] It is apparent that those skilled in the art should recognize that the above described modules or steps of the present application can be implemented by general computing devices, which can be centralized on a single computing device or distributed on a network composed of multiple computing devices, alternatively, they can be implemented by program codes executable by computing devices, which can be stored in storage devices and executed by computing devices, or they can be respectively manufactured as individual integrated circuit modules, or multiple modules or steps among them can be manufactured as a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
[0139] The above description is merely preferred embodiments of the present application, but not to limit the present application. Any modification, equivalent replacement and improvement made in the spirit and principle of the present application shall be included in the scope of protection of the present application.
Claims
1. A compression method of a black and white picture, characterized in that, The method comprises the following steps: Obtain the original picture, and mark the pixel points of the smaller number of black and white pixel points; Record the position information of all the marked pixel points as (x, y); Determine the encoding position information of one original marked pixel point and the remaining marked pixel points; Save the pixel value, position information and encoding position information to obtain a compressed file; The method comprises the following steps: Obtain the original picture, and mark the pixel points of the smaller number of black and white pixel points; Obtain all the pixel points by traversing the original picture; Divide the obtained pixel points into black pixel points and white pixel points according to different pixel values; Compare the number of the two kinds of pixel points; According to the comparison result, mark the pixel points of the smaller number; The method comprises the following steps: Take the position of the original pixel point at the lower left corner of the picture as the origin (0, 0); Establish a coordinate system with the origin (0, 0), mark the original pixel point as an original unit distance, and take the straight line of the pixel point at the right of the origin as the positive direction of the x-axis of the coordinate axis, and take the straight line of the pixel point at the top of the origin as the positive direction of the y-axis of the coordinate axis; Based on the coordinate system, obtain the position of all the marked pixel points as (x, y); The method comprises the following steps: Obtain the pixel point numbers a and b of the length and width of the original picture to obtain the position information (a / 2, b / 2) of the central pixel point of the original picture; Compare the position information (x, y) of all the marked pixel points with the position information (a / 2, b / 2) of the central pixel point to obtain the closest marked pixel point as the original marked pixel point; Record the position information of the original marked pixel point as the second origin (x0, y0); Calculate the position difference of the remaining marked pixel points from the second origin as the encoding position information of the marked pixel point; The method comprises the following steps:
2. A black and white picture compression apparatus characterized by comprising: Save the pixel value and position information of all the unmarked pixel points, the pixel value and position information of the original marked pixel point, and the encoding position information of the remaining marked pixel points. The method comprises the following steps: A pixel point marking module is configured to obtain the original picture, and mark the pixel points of the smaller number of black and white pixel points; A position information recording module is configured to record the position information of all the marked pixel points as (x, y); A position information encoding module is configured to determine the encoding position information of one original marked pixel point and the remaining marked pixel points; A compression module is configured to save the pixel value, position information and encoding position information to obtain a compressed file; The method comprises the following steps: Obtain the original picture, and mark the pixel points of the smaller number of black and white pixel points; Obtain all the pixel points by traversing the original picture; Divide the obtained pixel points into black pixel points and white pixel points according to different pixel values; Compare the number of the two kinds of pixel points; According to the comparison result, mark the pixel points of the smaller number; The method comprises the following steps: Take the position of the original pixel point at the lower left corner of the picture as the origin (0, 0); A coordinate system is established with the origin (0, 0), and original pixel points are marked as original unit distances; a straight line of the lowermost row of pixel points to the right of the pixel point at the origin is taken as the positive direction of the x-axis of the coordinate axis, and a straight line of the leftmost row of pixel points above the pixel point at the origin is taken as the positive direction of the y-axis of the coordinate axis; Based on the coordinate system, the positions of all marked pixel points are obtained as (x, y); The determination of the encoding position information of one original marked pixel point and the remaining marked pixel points comprises: The pixel point numbers a and b of the original picture length and width are obtained to obtain the position information (a / 2, b / 2) of the central pixel point of the original picture; The position information (x, y) of all marked pixel points is compared with the position information (a / 2, b / 2) of the central pixel point to obtain the closest marked pixel point as the original marked pixel point; The position information of the original marked pixel point is recorded as the second origin (x0, y0); The position difference of the remaining marked pixel points and the second origin is calculated as the encoding position information of the marked pixel point; The pixel value, position information, and encoding position information are saved to obtain a compressed file, comprising: The pixel values and position information of all unmarked pixel points, the pixel values and position information of the original marked pixel point, and the encoding position information of the remaining marked pixel points are saved.
3. The apparatus of claim 2, wherein The pixel point marking module comprises: A pixel point counting unit is configured to obtain all pixel points by traversing the original picture; A pixel point classification unit is configured to classify the obtained pixel points into black pixel points and white pixel points according to different pixel values; A pixel point comparison unit is configured to compare the number of the two kinds of pixel points; A pixel point marking unit is configured to mark the fewer kind of pixel points according to the comparison result.
4. An electronic device comprising a memory and a processor, the memory storing a computer program, characterized in that, The computer program executed in the processor can implement the method of claim 1.
5. A storage medium storing a computer program, characterized by The computer program executed in the processor can implement the method of claim 1.
Citation Information
Patent Citations
Binary foreground compression coding method
CN105992010A