Display control method, electronic device and display system
By generating bitmap images by electronic devices and controlling the display color value of the dot matrix display, the problem of limited dot matrix font library resources in the prior art is solved, and the rapid display of arbitrary characters and images is realized.
Patent Information
- Application Number
- CN202211046940.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-30
- Publication Date
- 2025-03-21
- Estimated Expiration
- 2042-08-30
AI Technical Summary
Existing LED displays rely on specific dot matrix font libraries, with limited resources, and limited display selection of characters and images, making them inconvenient to use.
The bitmap image of the object to be displayed is generated by an electronic device, and a control image that controls the display color value of the light emitting device in the dot matrix display is obtained based on the image, so that the dot matrix display does not need to carry a specific dot matrix font library, and realizes the rapid conversion output of any characters and images.
It realizes the function of displaying any characters and images without a specific dot matrix font library, which improves the flexibility and efficiency of display.
Smart Images

Figure CN115424569B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a display control method, electronic equipment and a display system. Background Art
[0002] With the increasing application of LED (Light Emitting Diode) display devices, they are particularly widely used in public transportation electronic road signs and billboards in recent years. The variability of their display content is a trend of electrification and intelligent development, replacing the previous rigid public transportation electronic road signs and billboards, and are very popular. With the increase in users, the demand is also diversified.
[0003] At present, LED displays include LED display screens formed by LED dot matrices and dot matrix controllers, and dot matrix controllers integrate dot matrix fonts of specific languages. The dot matrix font library is a data file, in which the dot matrix data of all characters are stored. For the 16*16 dot matrix Chinese character font library, each Chinese character occupies 32 bytes, with 16 rows from top to bottom, and two bytes per row for a total of 16 bits. The font data storage of dot matrix Chinese characters is very standardized, divided into horizontal modeling and vertical modeling: horizontal modeling is based on rows, and the font data is stored in the order from left to right and from top to bottom; vertical modeling is based on columns, and the font data is stored in the order of the first 8 rows from top to bottom and from left to right, and the next 8 rows from top to bottom and from left to right.
[0004] Furthermore, after the user inputs a character, the dot matrix controller can query the position of the character in the dot matrix font library, read the font data of the character based on the position, and control the LED display screen to display the character based on the font data.
[0005] However, since common dot matrix font resources are limited and there are few choices in fonts and glyphs, it is not convenient to use.
[0006] The information disclosed in this background technology section is only intended to enhance the understanding of the overall background of the invention and should not be regarded as an acknowledgment or any form of suggestion that the information constitutes the prior art already known to a person skilled in the art. Summary of the invention
[0007] The embodiments of the present invention provide a display control method, an electronic device and a display system, which rely on an electronic device other than a dot matrix display to generate a bitmap image of an object to be displayed, and based on the bitmap image, obtain a control image for controlling the display color value of a light-emitting device in the dot matrix display, so that the dot matrix display does not need to carry a specific dot matrix font library, and can realize the rapid conversion and output of any characters and images.
[0008] In a first aspect, an embodiment of the present invention provides a display control method, wherein an electronic device receives first data, the first data being used to indicate an object to be displayed; the electronic device generates a bitmap image of the object to be displayed based on the first data; the electronic device determines a first control image adapted to a first display size based on the bitmap image; the dot matrix display includes a display screen composed of a plurality of light-emitting devices, the pixel value of each pixel in the first control image indicates a display color value of the light-emitting device in the dot matrix display; the first display size indicates the size of an area on the dot matrix display screen displaying the object to be displayed; the electronic device sends the data of the first control image to the dot matrix display, instructing the dot matrix display to control the display color value of the light-emitting device based on the data of the control image, so as to realize the display of the object to be displayed.
[0009] In this solution, an electronic device other than the dot matrix display is relied upon to generate a bitmap image of the object to be displayed. Based on this image, a control image for controlling the display color values of the light-emitting devices in the dot matrix display is obtained, so that the dot matrix display does not need to carry a specific dot matrix font library and can achieve rapid conversion and output of any characters and images.
[0010] In a possible implementation manner, the first data is a first identifier of the object to be displayed.
[0011] Optionally, the object to be displayed is a character, and the first identifier is a character code and a font.
[0012] Optionally, the object to be displayed is an image, and the first identifier is an image storage address.
[0013] In a possible implementation manner, the first data is description data of the object to be displayed.
[0014] Optionally, the object to be displayed is a character, and the description data is a bitmap image or vector data representing the character.
[0015] Optionally, the object to be displayed is an image, and the description data is an image file, or data after decoding the image file.
[0016] In a possible implementation manner, when the bitmap image is a binary image and has the same first display size as the object to be displayed, the control image is a bitmap image.
[0017] In a possible implementation manner, the method further includes: the electronic device acquiring operation information of the user; and the electronic device determining the first data based on the operation information of the user.
[0018] In this solution, the electronic device can obtain the first data through the user interaction interface and the user's operation through the user's operation, so that the obtained first data meets the user's needs.
[0019] In a possible implementation, the object to be displayed is a character string, the character string includes multiple characters, the bitmap image includes bitmap images corresponding to each of the multiple characters, and the electronic device determines a first control image adapted to a first display size based on the bitmap image, including: the electronic device determines the character size; wherein the character size indicates the size of an area on a dot matrix display screen where characters are displayed; the electronic device processes the bitmap images corresponding to each of the multiple characters based on the character size, respectively, to obtain character control images corresponding to each of the multiple characters adapted to the character size; the electronic device splices the character control images corresponding to each of the multiple characters, to determine a first control image adapted to the first display size of the character string.
[0020] In this solution, by splicing character control images, the layout of multiple characters in a character string can be flexibly designed to meet the needs of various scenarios.
[0021] In one possible implementation, when the bitmap image is not a binary image, the electronic device determines a control image adapted to the first display size based on the bitmap image, including: the electronic device binarizes the bitmap image to obtain a binary image; the electronic device scales the binary image based on the first display size to obtain a first control image adapted to the first display size.
[0022] In this solution, by scaling the bitmap image, the electronic device can obtain a control image that can be connected to the dot matrix display, so that the dot matrix display can display the control image sent by the electronic device without being restricted by the resource limitations of the dot matrix display itself.
[0023] In a possible implementation, scaling a binary image to obtain a control image adapted to a first display size includes: an electronic device determining at least one decision tree for an object to be displayed; wherein the at least one decision tree is used to perform pixel aggregation on first window data of a first window on the binary image; and the electronic device performs pixel aggregation on first window data in a process of the first window traversing the binary image through the at least one decision tree to obtain a control image adapted to the first display size.
[0024] In this solution, the decision tree can be used to flexibly design pixel aggregation methods to meet the needs of various scenarios.
[0025] In a possible implementation, the method also includes: when there are multiple objects to be displayed, the electronic device determines position information corresponding to the multiple objects to be displayed; the position information indicates an area on the dot matrix display screen where a first control image corresponding to each of the multiple objects to be displayed is displayed; the electronic device sends the position information and the first control image corresponding to each of the multiple objects to be displayed to the dot matrix display, instructing the dot matrix display to display the multiple objects to be displayed based on the position information and the first control image corresponding to each of the multiple objects to be displayed.
[0026] In this solution, the first control images of the multiple objects to be displayed are laid out according to the position information of the multiple objects to be displayed, so that the dot matrix display can display the multiple objects to be displayed, which can meet various scene requirements.
[0027] In a possible implementation, the method also includes: when there are multiple objects to be displayed, the electronic device determines position information corresponding to the multiple objects to be displayed; the position information indicates the area on the dot matrix display screen where the first control image corresponding to each of the multiple objects to be displayed is displayed; based on the position information and the second display size of the dot matrix display, the electronic device processes the first control image corresponding to each of the multiple objects to be displayed to determine a second control image adapted to the second display size; the electronic device sends the second controller image to the dot matrix display to instruct the dot matrix display to display the multiple objects to be displayed based on the second control image.
[0028] In this solution, the first control images of the multiple objects to be displayed are laid out according to their position information to obtain a second control image adapted to the display size of the dot matrix display, so that the dot matrix display displays the multiple objects to be displayed based on the second control image.
[0029] In the second aspect, an embodiment of the present invention provides a display control device / electronic device, which includes several modules, each of which is used to execute each step in the display control method provided in the first aspect of the embodiment of the present invention, and the division of modules is not limited here. For the specific functions performed by each module of the display control device / electronic device and the beneficial effects achieved, please refer to the functions of each step of the display control method provided in the first aspect of the embodiment of the present invention, which will not be repeated here.
[0030] For example, a display control device / electronic device includes:
[0031] A data determination module, used for determining first data, where the first data is used for indicating an object to be displayed;
[0032] An image generation module, used for generating a bitmap image of an object to be displayed based on the first data;
[0033] An adjustment module is used to determine a first control image adapted to a first display size based on the bitmap image; the pixel value of each pixel in the first control image indicates a display color value of a light-emitting device in a dot matrix display, the dot matrix display includes a dot matrix display screen composed of a plurality of light-emitting devices, and the first display size indicates a size of an area on the dot matrix display screen displaying an object to be displayed;
[0034] The sending module is used to send the data of the first control image to the dot matrix display, instructing the dot matrix display to control the display color value of the light-emitting device based on the data of the first control image to realize the display of the object to be displayed.
[0035] In a possible implementation, the first data is a first identifier of an object to be displayed. Optionally, the object to be displayed is a character, and the first identifier is a character code and a font. Optionally, the object to be displayed is an image, and the first identifier is an image storage address.
[0036] In a possible implementation, the first data is description data of an object to be displayed. Optionally, the object to be displayed is a character, and the description data is a bitmap image or vector data representing the character. Optionally, the object to be displayed is an image, and the description data is an image file, or data after decoding the image file.
[0037] In a possible implementation manner, when the bitmap image is a binary image and has the same first display size as the object to be displayed, the control image is a bitmap image.
[0038] In a possible implementation, the display control device / electronic device further includes: a first data acquisition module, configured to acquire user operation information; and determine first data based on the user operation information.
[0039] In a possible implementation, the object to be displayed is a character string, the character string includes multiple characters, the bitmap image includes bitmap images corresponding to each of the multiple characters, and the adjustment module includes: a size determination unit, used to determine the character size; wherein the character size indicates the size of the area on the dot matrix display screen where the character is displayed; a first adjustment unit, used to process the bitmap images corresponding to each of the multiple characters based on the character size, respectively, to obtain character control images corresponding to each of the multiple characters that are adapted to the character size; and a splicing unit, used to splice the character control images corresponding to each of the multiple characters, to determine a first control image adapted to a first display size of the character string.
[0040] In a possible implementation, when the bitmap image is not a binary image, the adjustment module includes: a binarization unit, used to binarize the bitmap image to obtain a binary image; and a second adjustment unit, used to scale the binary image based on a first display size to obtain a first control image adapted to the first display size.
[0041] In one possible implementation, the second adjustment unit is used to execute the following: determine at least one decision tree for the object to be displayed; wherein, at least one decision tree is used to perform pixel aggregation on the first window data of the first window on the binary image; through at least one decision tree, perform pixel aggregation on the first window data in the process of the first window traversing the binary image to obtain a control image adapted to the first display size.
[0042] In a possible implementation, the device also includes: a position determination module, which is used to determine the position information corresponding to the multiple objects to be displayed when there are multiple objects to be displayed; the position information indicates the area where the first control images corresponding to the multiple objects to be displayed are displayed on the dot matrix display screen; and the sending module is used to send the position information and the first control images corresponding to the multiple objects to be displayed to the dot matrix display, instructing the dot matrix display to display the multiple objects to be displayed based on the position information and the first control images corresponding to the multiple objects to be displayed.
[0043] In a possible implementation, the device also includes: a position determination module, which is used to determine the position information corresponding to the multiple objects to be displayed when there are multiple objects to be displayed; the position information indicates the area on the dot matrix display screen where the first control image corresponding to each of the multiple objects to be displayed is displayed; a layout adjustment module, which is used to process the first control image corresponding to each of the multiple objects to be displayed based on the position information and the second display size of the dot matrix display, and determine a second control image adapted to the second display size; and a sending module is used to send the second controller image to the dot matrix display, instructing the dot matrix display to display the multiple objects to be displayed based on the second control image.
[0044] In a third aspect, an embodiment of the present invention provides a display control device / electronic device, comprising: at least one memory for storing programs; and at least one processor for executing the programs stored in the memory, wherein when the programs stored in the memory are executed, the processor is used to execute the method provided in the first aspect.
[0045] In a fourth aspect, an embodiment of the present invention provides a display control device / electronic device, characterized in that the device / electronic device runs computer program instructions to execute the method provided in the first aspect.
[0046] In one example, the device / electronic device may include a processor, which may be coupled to a memory, read instructions in the memory, and execute the method provided in the first aspect according to the instructions. The memory may be integrated in a chip or a processor, or may be independent of the chip or the processor.
[0047] In a fifth aspect, an embodiment of the present invention provides a display control system, including an electronic device and a dot matrix display, wherein the electronic device is used to implement the method provided in the first aspect.
[0048] In a sixth aspect, an embodiment of the present invention provides a computer storage medium, in which instructions are stored. When the instructions are executed on a computer, the computer executes the method provided in the first aspect.
[0049] In a seventh aspect, an embodiment of the present invention provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method provided in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 is a schematic diagram of a display scheme of a dot matrix display;
[0051] Figure 2 is a schematic diagram of a display solution provided by an embodiment of the present invention;
[0052] Figure 3 is a flow chart of a display control method provided by an embodiment of the present invention;
[0053] Figure 4 yes Figure 3 Schematic diagram of the process of step 301;
[0054] Figure 5a yes Figure 3 Schematic diagram of the process of step 303 Figure 1 ;
[0055] Figure 5b yes Figure 3 Schematic diagram of the process of step 303 Figure 2 ;
[0056] Figure 6a is a schematic diagram of a decision tree provided by an embodiment of the present invention;
[0057] Figure 6b is a schematic diagram of pixel aggregation of a character super provided in an embodiment of the present invention;
[0058] Figure 7 is a flow chart of another display control method provided by an embodiment of the present invention;
[0059] Figure 8 is a flow chart of another display control method provided by an embodiment of the present invention;
[0060] Figure 9a is a display schematic diagram of a first page provided by an embodiment of the present invention;
[0061] Figure 9b is a display schematic diagram of a second page provided by an embodiment of the present invention;
[0062] Fig.10 is a flow chart of a method for controlling display of a character string provided by an embodiment of the present invention;
[0063] Fig.11 is a flow chart of an image display control method provided by an embodiment of the present invention;
[0064] Fig.12 It is a flowchart of a video display control method provided by an embodiment of the present invention;
[0065] Fig.13 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0066] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be described below with reference to the accompanying drawings.
[0067] In the description of the embodiments of the present invention, words such as "exemplary", "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary", "for example" or "for example" in the embodiments of the present invention should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "for example" or "for example" is intended to present related concepts in a concrete way.
[0068] In the description of the embodiments of the present invention, the term "and / or" is only a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, B exists alone, and A and B exist at the same time. In addition, unless otherwise specified, the term "multiple" means two or more. For example, multiple systems refers to two or more systems, and multiple terminals refers to two or more terminals.
[0069] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprises", "has" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0070] Hereinafter, some terms used in this embodiment are explained. It should be noted that these explanations are for the convenience of understanding by those skilled in the art and do not constitute a limitation on the scope of protection claimed by the present invention.
[0071] Light-emitting device: A device that converts electrical energy into light energy, and can be produced from compound semiconductors of Group III and Group V elements on the periodic table, etc. Various colors can be expressed by adjusting the composition ratio of the compound semiconductors.
[0072] Light-emitting diode (LED for short): A commonly used light-emitting device that releases energy through the recombination of electrons and holes to emit light. It can efficiently convert electrical energy into light energy and has a wide range of uses, such as display screens, lighting fixtures, etc.
[0073] Dot matrix: A square dot matrix composed of light-emitting devices. Common specifications include 64x64, 32x32, 16x16, etc. By controlling the flickering of some light-emitting devices, information such as text, symbols, graphics and animation can be displayed on the dot matrix. When the light-emitting devices in the dot matrix are LEDs, the dot matrix can be called an LED dot matrix.
[0074] Dot matrix display: It consists of at least three parts: dot matrix display screen, dot matrix controller and power supply. It has been widely used in daily life and can be used in scenarios such as bus stop announcers, highway electronic road signs and equipment operation status information display. Here, the purpose of the power supply is to convert the external input AC power, usually 220V AC power, into various DC power to provide to various circuits. The dot matrix display screen is composed of dots arranged in a matrix. The controller can display information by controlling the flashing of the light-emitting devices in the dot matrix. When the dot matrix is an LED dot matrix, the dot matrix display screen can be called an LED dot matrix display screen.
[0075] Client: A processing program installed on an electronic device for a user to interact with a dot matrix display (which can be considered as a server) so that the dot matrix display screen in the dot matrix display displays the content that the user wants to display. Here, the electronic device and the dot matrix display can communicate through a network.
[0076] Operating system (OS): A computer program that manages the hardware and software resources of an electronic device. An OS handles basic tasks such as managing and configuring memory, determining the priorities of system resource supply and demand, controlling input and output devices, operating networks, and managing file systems. An OS also provides an interface for users to interact with the system.
[0077] Canvas: A virtual rectangular area on which paths, rectangles, circles, characters, and images can be drawn and rendered. The canvas supports pixel-level operations, and users can also perform more advanced image processing operations on the canvas, such as displaying animations and 3D graphics.
[0078] File: Information stored on an electronic device using its hard drive as a carrier.
[0079] Character: A general term for words and symbols, including words, numbers, letters, punctuation marks, graphic symbols, etc.
[0080] Pixel: The smallest indivisible unit in the entire image, which has a clear position and color value. An image is composed of many pixels with different positions and color values. Under the premise that the image has not been compressed, the more pixels per unit area, the higher the resolution, and the displayed image will be closer to the real object.
[0081] Bitmap image (BMP for short): also known as a dot matrix image or raster image, it is composed of individual points called pixels (picture elements). These points can be arranged and dyed differently to form a pattern. When you enlarge the bitmap, you can see the countless individual squares that make up the entire image. The effect of enlarging the size of the bitmap is to increase the size of individual pixels, making the lines and shapes appear jagged. However, if you look at it from a slightly farther distance, the colors and shapes of the bitmap image appear continuous. Photos taken with a digital camera, images scanned by a scanner, and computer screenshots are all bitmaps. The characteristic of a bitmap is that it can show color changes and subtle color transitions, producing a realistic effect. The disadvantage is that it needs to record the position and color value of each pixel when saving, which takes up a large storage space.
[0082] Binarization of bitmap images: Set the grayscale value of the pixels on the bitmap image to 0 or 255, that is, the entire image presents a clear visual effect of only black and white. At this time, the resulting image can be called a black and white image or a binary image. When the grayscale value = 0, the pixel is black, and when the grayscale value = 255, the pixel is white.
[0083] Image file: A computer disk file that depicts an image. The format of the image file can be JPEG (Joint Photographic Experts Group) format, BMP format, etc. The embodiment of the present invention does not make any specific limitation on this, and the specific format can be determined in combination with actual needs. Here, the BMP format is the image file storage format adopted by Windows, and all image processing software running in the Windows environment supports this format. The number of points of data that need to be saved for an image in BMP format is the actual number of points of data, without compression. Analogous to the source code, it is the most original image. In actual applications, the real image occupies a large storage space. In order to save storage space, it is usually necessary to encode the real image, that is, compress it to obtain an image file. After reading the image file, in order to obtain the real image, it is necessary to decode the image file to obtain the image.
[0084] Video file: A computer disk file used to describe animation, animation and audio. Here, animation refers to an image sequence composed of several interrelated frames of still images. These still images are continuously broadcast to form a group of animations, which are usually used to complete dynamic process demonstrations. In practical applications, real videos occupy a large amount of storage space. In order to save storage space, it is usually necessary to encode the real video, that is, compress it to obtain a video file. After reading the video file, in order to obtain a real image sequence, it is necessary to decode the video file to obtain the image sequence.
[0085] Font library: The image source for displaying characters, which stores the shape information of each character in a font. Files (called font files for the sake of ease of description and distinction) are used to store the character files of multiple characters in a font. In fact, each character displayed on the computer (regardless of the language) is a small pattern. The font library saves these small patterns in some form of images as character files, and restores them to images when they need to be displayed. The font library in the Windows operating system is stored in the system disk windows / fonts folder, and in the Linux operating system, the font library is stored in the / usr / share / fonts / folder.
[0086] There are two types of fonts, one is dot matrix font and the other is vector font.
[0087] Among them, the dot matrix font stores the dot matrix data of the characters, that is, the font data, and a bitmap image can be directly generated based on the data. For example, the dot matrix font can be the HZK16 font, which is a 16x16 dot matrix font that complies with the GB2312-80 standard of the People's Republic of China. The HZK16 font supports 6763 commonly used Chinese characters, including 3755 first-level Chinese characters, which are stored in phonetic order, and 3008 second-level Chinese characters, which are stored by radicals. In addition, the HZK16 font also supports 682 commonly used symbols. Similarly, other languages also have corresponding dot matrix font files. In the HZK16 font file, the position index information of each character is formed by two bytes, the first byte is the area code, and the second byte is the bit code.
[0088] Among them, the vector font stores the vector data of characters, and vector images can be generated based on the vector data. Vector images refer to graphic data forms that describe the geometric characteristics of a graphic or graphic image area with specific graphic types (such as points, lines, circles, cones, etc.) and drawing parameters (such as coordinates, line width, color values, etc.), or composite vector graphics composed of multiple single vector graphics - such as vector glyphs; for example, a two-dimensional ring can be drawn by describing its center, outer ring radius, inner ring radius, color, edge line type, line width and edge color; a three-dimensional sphere can be drawn very realistically by describing its center coordinates, sphere radius, sphere color, sphere reflectivity / transparency and light source coordinates and light color; for another example, text can be displayed by giving the character number, font, font size and color without having to pass the pixel value of each coordinate point on the word. Correspondingly, vector data represents the geometric characteristics of characters, and vector images are obtained by drawing graphics through geometric characteristics. In addition, vector images have the following advantages over bitmap images: (1) Small data volume: Only the graphic type and simple drawing parameters need to be described to describe a complex graphic. (2) No distortion (jagged edges) when zooming in or out: For a bitmap image, if you zoom in, each pixel must be magnified, so jagged edges will appear; for a vector image, after zooming in, the edge will still be smooth if the calculation and display are performed according to the magnification ratio. Based on this, in practical applications, considering that the bitmap font library occupies a large storage space, a vector font library is usually selected.
[0089] Character set: a collection of character encodings; character encoding is a unified set of standards for storing and transmitting information between different computers. Character sets can include character sets of different writing systems. For example, English is the ASCII (American Standard Code for Information Interchange) character set, Simplified Chinese is the GBK (Chinese Internal Code Specification, Chinese character encoding character set), and Traditional Chinese is the Big5 (Chinese text (old version), Chinese text (old version)) character set; it can also include the Unicode character set (a unified and unique binary encoding is set for each character in each language to meet cross-language and cross-platform requirements).
[0090] Decision tree: A tree-like logical structure that can be a binary tree or a non-binary tree. Each non-leaf node represents a test on a feature attribute, each branch represents the output of this feature attribute in a certain value range, and each leaf node stores a category. The process of using a decision tree to make decisions is to start from the root node, test the corresponding feature attributes in the item to be classified, and select the output branch according to its value until it reaches the leaf node, and the category stored in the leaf node is used as the decision result.
[0091] Figure 1 is a schematic diagram of a display control method, such as Figure 1 As shown, in the related technology, the dot matrix display in the LED display loads the dot matrix font library, queries the position of the character input by the user in the dot matrix font library, and then reads the dot matrix data of the character in the dot matrix font library based on the position, that is, the font data, converts the dot matrix data into a rendering matrix, and controls the dot matrix display screen in the LED display to display the character.
[0092] For the above technical solution, on the one hand, it relies on the dot matrix font library, and special characters that do not exist in the dot matrix font library will result in garbled characters or blanks; on the other hand, graphics cannot be displayed.
[0093] Figure 2 This is an example diagram of the architecture of a display system provided by an embodiment of the present invention. Figure 2 As shown, the display system includes an electronic device 100 and a dot matrix display 200, and the electronic device 100 and the dot matrix display 200 communicate through a network.
[0094] The network may be a wired network or a wireless network. For example, the wired network may be a cable network, an optical fiber network, a digital data network (DDN), etc., and the wireless network may be a telecommunication network, an internal network, the Internet, a local area network (LAN), a wide area network (WAN), a wireless local area network (WLAN), a metropolitan area network (MAN), a public switched telephone network (PSTN), a Bluetooth network, a ZigBee network, a mobile phone (Global System for Mobile Communications, GSM), a CDMA (Code Division Multiple Access) network, a CPRS (General Packet Radio Service) network, etc. or any combination thereof. It is understandable that the network can use any known network communication protocol to achieve communication between different client layers and gateways. The above-mentioned network communication protocol can be various wired or wireless communication protocols, such as Ethernet, universal serial bus (USB), Firewire, global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), new radio (NR), Bluetooth, wireless fidelity (Wi-Fi) and other communication protocols.
[0095] Among them, the electronic device 100 can be understood as a device that at least has the function of communicating with the dot matrix display, rendering function and image processing function, which can be but not limited to various personal computers, laptops, smart phones, tablet computers, car computers, etc. Exemplary embodiments of the electronic device 100 involved in this solution include but are not limited to electronic devices equipped with iOS, Android, Windows, Harmony OS or other operating systems. In actual applications, the electronic device 100 is installed with a client 101 and an operating system 102. The client 101 communicates with the dot matrix display 200 through the electronic device 100, and the client 101 realizes data processing by calling the functions of the operating system 102.
[0096] The dot matrix display 200 includes a dot matrix controller 201 and a dot matrix display screen 202. The dot matrix display screen 202 is formed by a plurality of light emitting devices arranged in a matrix. Specifically, a plurality of light emitting devices may be arranged in a dot matrix, and a plurality of dot matrices may be arranged in a matrix to obtain the dot matrix display screen 202. It is worth noting that the dot matrix display 200 provided in the embodiment of the present invention can be widely used in scenes where content needs to be frequently changed, such as highway road signs, large-screen signboards, bus stop announcers, etc. The dot matrix display screen 202 in the dot matrix display 200 can provide a rich content display form, such as characters, images, videos, etc.
[0097] The embodiment of the present invention relies on the rendering function and image processing function of the electronic device 100 itself to achieve rapid conversion and output of any characters and images to the dot matrix display for display, so that the dot matrix display does not need to carry a specific dot matrix font library and can display any content.
[0098] Next, a display control method provided by an embodiment of the present invention is introduced. The method can be executed by any device, equipment, platform, or device cluster with computing and processing capabilities. For example, Figure 2 The electronic device 100 in the embodiment is used as an example for explanation below.
[0099] Figure 3 A flow chart of a display control method provided by an embodiment of the present invention is shown. The method comprises the following steps:
[0100] Step 301: determine first data, where the first data is used to indicate an object to be displayed.
[0101] According to a feasible implementation, the first data is used to indicate the object to be displayed. For example, the first data may be a first identifier of the object to be displayed, or description data of the object to be displayed. The description data of the object to be displayed may be data describing the object to be displayed.
[0102] In actual applications, the electronic device 100 stores character sets, character libraries, image files (referred to as local image files for ease of description and distinction), and video files (referred to as local video files for ease of description and distinction); here, for ease of description and distinction, the images described by the local image files are referred to as local images, and the videos described by the local video files are referred to as local videos. In some possible cases, other electronic devices other than the electronic device 100 may store image files or video files of objects to be displayed. Here, for ease of description and distinction, the image files stored in other electronic devices 100 are referred to as remote image files, and the images described by the remote image files are referred to as remote images. Videos are similar and will not be described in detail. Figure 2 The electronic device 300 and the electronic device 400 are shown. The electronic device 300 stores a remote video file, and the electronic device 400 stores a remote video file and a remote image file.
[0103] In one example, the object to be displayed may be a character. Correspondingly, the first identifier may be a character identifier (i.e., the first identifier). Specifically, the character identifier may be understood as a mark that can be used to query the character data in the character set of the font. Optionally, the character identifier may be a character code and a font; here, the description data is the character data in the character set of the font corresponding to the font, and the character data may be the above-mentioned vector data, or the above-mentioned dot matrix data, i.e., font data. It is worth noting that the electronic device 100 is installed with an operating system 102. In the embodiment of the present invention, the character set of the font provided by the operating system 102 can meet the needs of various characters, and is no longer limited to the display of characters that can be displayed by the dot matrix font library.
[0104] In one example, the object to be displayed may be a string. The string may be understood as an array formed by a number of characters. For example, if the characters are words, the string may be a word or sentence formed by the words. Correspondingly, the first identifier may be a character identifier of each character in the string, and the description data may be description data of each character in the string.
[0105] In one example, the object to be displayed may be an image. Correspondingly, the first identifier may be an image identifier, such as Figure 2 As shown, the description data may be storage data. Considering that images are usually stored after being encoded in order to reduce storage space, the description data may also be decoded data after the storage data is decoded. Here, the image identifier may be the storage address of the image. The image here may be a local image or a remote image. The storage address may be an absolute path, and the absolute path is a path starting from a drive letter. When the object to be displayed is a remote image, the storage address may be a URL (uniform resource locator).
[0106] In one example, the object to be displayed may be a video. Correspondingly, the first identifier may be a video identifier, and the description data may be storage data. Considering that videos are usually encoded and stored in order to reduce storage space, the description data may also be decoded data after the storage data is decoded. Here, the video identifier may be the storage address of the video. The video here may be a local video or a remote video. The storage address may be an absolute path, and the absolute path is a path starting from a drive letter. When the object to be displayed is a remote video, the storage address may be a URL (uniform resource locator).
[0107] It should be pointed out that in actual applications, there may be multiple objects to be displayed, and the multiple objects to be displayed may be any one or more of the above-mentioned characters, images or videos.
[0108] Step 302: Generate a bitmap image of the object to be displayed based on the first data.
[0109] According to a feasible implementation, the electronic device 100 has a module for creating a canvas and rendering functions (referred to as a rendering module for ease of description and distinction), and the rendering module is used to generate a bitmap image of an object to be displayed based on the first data. In practical applications, the rendering module can be understood as a functional module of the operating system 102 installed in the electronic device 100.
[0110] It is worth noting that the rendering function of the operating system 102 in the embodiment of the present invention can meet various image rendering requirements and is no longer limited to the display of characters that can be displayed by the dot matrix font library. In actual applications, the electronic device 100 calls the rendering module through the operating system 102 to obtain a bitmap image of the object to be displayed.
[0111] In addition, when calling the rendering module, it is necessary to generate a request based on the parameter value of the input parameter required by the rendering module (for the convenience of description and distinction, referred to as a rendering request); the electronic device 100 calls the rendering module in response to the rendering request to obtain a bitmap image of the object to be displayed. Here, in order to call the rendering module, the input parameter includes at least the identifier of the rendering module, so that the operating system 102 can call the rendering module based on the identifier. Usually, the identifier of the rendering module can be considered as the name of the rendering module. Further, the rendering module also includes the canvas size and the first data determined in step 301. It is worth noting that the canvas size can be a default or a user setting. The embodiment of the present invention does not specifically limit this, and it can be determined in combination with actual needs. It should be noted that the canvas size is usually much larger than the size of the dot matrix of the dot matrix display screen 202. In actual applications, considering that the dot matrix is a square, in order to facilitate processing, the length and width of the canvas size are the same, in other words, the number of rows and columns of the bitmap image are the same. It should be noted that the content of the first data needs to be determined in combination with the input parameters of the rendering module.
[0112] Combine the following Figure 2 Describes the input parameters of the rendering module when the object to be displayed is a character.
[0113] Optionally, the first data included in the input parameter is a character identifier. The rendering module can create a canvas adapted to the size based on the canvas size, and then read the stored data of the character based on the character identifier. Further, the character can be drawn on the canvas based on the stored data of the character to obtain a bitmap image.
[0114] Regarding character identification and storage data, please refer to the description of step 301 above and will not be repeated here.
[0115] Furthermore, the input parameters of the rendering module may also include a brush color. Here, the brush color is black, so that the obtained bitmap image is a black and white image, that is, a binary image.
[0116] Optionally, the first data included in the input parameter is character description data. Here, the client 101 in the electronic device 100 reads the character description data based on the character identification. The rendering module can create a canvas adapted to the size based on the canvas size, and then draw the character on the canvas based on the character description data to generate a bitmap image.
[0117] Combine the following Figure 2 Describes the input parameters of the rendering module when the object to be displayed is a string.
[0118] Optionally, the first data included in the input parameter is the character identifier of each character in the string. Further, the input parameter also includes the size of the character (for the convenience of description and distinction, referred to as the character size, represented by the number of rows and columns), the number of columns of the string (for the convenience of description and distinction, referred to as the number of string columns), the column spacing, and the line spacing. The rendering module can create a canvas adapted to the size based on the canvas size, and then, based on the character identifier of each character in the string, the storage data of the character can be read. Further, based on the storage data of each character in the string, the size of the character, the number of string columns, the column spacing, and the line spacing, the string can be drawn on the canvas to obtain a bitmap image. It is worth noting that in actual applications, if there are fewer characters in the string, there is only 1 row, and at this time, the line spacing is 0. In addition, the input parameter can also have the number of string columns. At this time, when the electronic device 100 draws the string on the canvas, it can draw the character from left to right based on the character size. If it exceeds the length of the canvas, it will automatically wrap and continue to draw until the drawing of the string is completed.
[0119] Optionally, the first data included in the input parameter is the description data of each character in the string. Further, the input parameter also includes the number of string columns, column spacing, and line spacing; here, the client 101 in the electronic device 100 reads the description data of the character based on the identifier of each character in the string. The rendering module can create a canvas adapted to the size based on the canvas size, and then, based on the description data of each character in the string, the number of string columns, column spacing, and line spacing, the string is drawn on the canvas to obtain a bitmap image.
[0120] Combine the following Figure 2 Describes the input parameters of the rendering module when the object to be displayed is an image or a video. Images are similar to videos, except that when the object to be displayed is a video, the rendering module generates an image sequence. The following description takes an image as an example.
[0121] Optionally, the first data included in the input parameter may be an image identifier. Correspondingly, the rendering module in the electronic device 100 reads the stored data of the image based on the image identifier, and generates a bitmap image by drawing on the created canvas of the adapted canvas size based on the stored data of the image.
[0122] Optionally, the first data included in the input parameter may be stored data of the image. Here, the client 101 in the electronic device 100 reads the stored data of the image based on the identification of the image. Further, the rendering module generates a bitmap image by drawing on the created canvas of the adapted canvas size based on the stored data of the image.
[0123] Optionally, the input parameters may also include decoded data of the stored data of the image. Here, the client 101 in the electronic device 100 reads the stored data of the image based on the identification of the image and decodes it to obtain the decoded data of the image. Further, the rendering module generates a bitmap image by drawing on a created canvas of an adapted canvas size based on the decoded data of the image. Here, the rendering data may be a bitmap image or vector data.
[0124] It should be noted that the bitmap image returned by the rendering module can be a color image or a black and white image. In practical applications, the rendering module usually does not change the color of the image or video, but the color of the character can be controlled by the brush color.
[0125] Step 303: Based on the bitmap image, determine a first control image adapted to a first display size; the pixel value of each pixel in the first control image indicates a display color value of a light-emitting device in a dot matrix display, the dot matrix display includes a dot matrix display screen composed of a plurality of light-emitting devices, and the first display size indicates the size of an area on the dot matrix display screen that displays an object to be displayed.
[0126] The technical solution provided by the embodiment of the present invention relies on the electronic device 100 itself being able to generate a bitmap image, and the image processing function to obtain a control image adapted to the first display size, so that the dot matrix display does not need to carry a specific dot matrix font library and can display any content.
[0127] Here, the first display size is represented by the number of rows and columns of the display area of the object to be displayed in the dot matrix display screen 202 in the dot matrix display 200, and is usually represented by m (number of rows) * n (number of columns), which is less than or equal to the second display size of the dot matrix display. Here, the second display size is the size of the dot matrix display screen 202 in the dot matrix display 200, and is represented by the number of rows and columns of the dot matrix display screen 202. It should be noted that the second display size is also represented by m*n, so the first display size and the second display size include the number of rows and columns.
[0128] Here, the first display size may be a default size or a manually preset size.
[0129] In one example, the first display size may be a default size, that is, a first display size pre-stored in the electronic device 100 .
[0130] For example, when the object to be displayed is a character, the first display size is the display size of the character, and the default size may be the size of the dot matrix of the dot matrix display screen 202 . For example, if the size of the dot matrix is 64×64, the display size of the character is 64×64.
[0131] For example, when the object to be displayed is an image or a video, the default size may be the second display size of the dot matrix display screen 202 .
[0132] In one example, the first display size may be a size input by the user through the electronic device 100, which is smaller than or equal to the second display size of the dot matrix display screen 202. For example, if the dot matrix size is 64×64 and the second display size of the dot matrix display screen 202 is 128*320, the first display size may be 64×128, which means the length is 64 and the width is 128, or 128×64, which means the length is 128 and the width is 64.
[0133] Step 304: Send the data of the first control image to the dot matrix display, instructing the dot matrix display to control the display color value of the light-emitting device based on the data of the first control image, so as to realize the display of the object to be displayed.
[0134] At present, the main implementation method of the dot matrix display is: input the first control image to the dot matrix controller 201, the pixel value of each pixel in the image describes the display color value of a light-emitting device, and the dot matrix controller 201 is used to associate each pixel with a different light-emitting device in the dot matrix display screen 202, and control the corresponding light-emitting device to emit color through the pixel value of the pixel, so as to display the object to be displayed on the dot matrix display screen 202. It should be pointed out that the first control image is composed of pixels arranged in a matrix, which is essentially a binary matrix. There are only two pixel values of the pixels, representing two different colors. Optionally, two pixel values are used to represent on and off, one is the pixel value representing the on light-emitting device (for the convenience of description and distinction, it is called the on pixel value), and the other is the pixel value representing the off light-emitting device (for the convenience of description and distinction, it is called the off pixel value). In an example, the on pixel value is a pixel value representing black, and the off pixel value is a pixel value representing white. The following is described using this as an example.
[0135] It should be noted that if there is only one object to be displayed, the dot matrix display will control the light-emitting devices that are not associated with the pixels in the first control image based on the pixel value indicating off. In addition, the dot matrix controller will also display the object to be displayed in the middle position of the dot matrix display screen. Of course, the electronic device 100 can also determine the display position of the object to be displayed, indicating the display area of the object to be displayed in the dot matrix display screen 202, and sending the position to the dot matrix display 200, so that the dot matrix display 200 can display the character string at the display position.
[0136] The technical solution provided by the embodiment of the present invention relies on the electronic device itself to generate bitmap images and image processing functions, which can realize the rapid conversion and output of any characters and images to obtain a control image, so that the dot matrix display can display based on the control image sent by the electronic device without carrying a specific dot matrix font library, thereby realizing the display of any content.
[0137] Figure 4 A flow chart of a display control method provided by an embodiment of the present invention is shown.
[0138] like Figure 4 As shown, Figure 3 Step 301 shown includes at least the following steps:
[0139] Step 3011: Obtain user operation information.
[0140] In the embodiment of the present invention, the operation information indicates the operation of the user. Specifically, when the user operates, the electronic device 100 can obtain the user's operation information. For example, the electronic device 100 has a touch screen, and the operation indicated by the operation information can be the user's operation on the touch screen; for example, the electronic device 100 has a keyboard, and the operation indicated by the operation information can be the user's operation on the keyboard; for example, the electronic device 100 has a mouse, and the operation indicated by the operation information is the user's operation through the mouse, such as selecting information in a list, copying and pasting information, etc. to input information.
[0141] In one example, the user's operation information may be a key code value of a character, a storage address of an image, a storage address of a video, and the like.
[0142] Step 3012: Determine the first data based on the user's operation information.
[0143] In actual applications, the electronic device 100 can know the object to be displayed that the user wants to display based on the user's operation information, thereby determining the first data. The details of the first data are as mentioned above and will not be repeated here.
[0144] In the embodiment of the present invention, based on the interaction between the electronic device and the user, the content that the user wants to display is determined to meet the user's needs.
[0145] exist Figure 5a A flow chart of a display control method provided by an embodiment of the present invention is shown.
[0146] like Figure 5a As shown, if the bitmap image is not a binary image, Figure 3 Step 303 shown includes at least the following steps:
[0147] Step 3031: Binarize the bitmap image to obtain a binary image.
[0148] The electronic device 100 scans each pixel on the bitmap image in rows and columns to obtain the RGB color value of each pixel, and then converts it into a 256-color grayscale value and stores it in the corresponding grayscale matrix; then, a window of a preset size traverses the grayscale matrix in a preset order, a step size in the row direction, and a step size in the column direction to achieve pixel aggregation, complete the binarization process, and obtain a binary image.
[0149] Here, for each slide, the pixels of the grayscale matrix are aggregated as follows:
[0150] Determine the window data of the window on the grayscale matrix, fuse the window data, determine the grayscale fusion value, and determine the aggregation result based on the grayscale fusion value. For example, when the grayscale fusion value is less than the preset threshold, the window data is aggregated into an on pixel value, otherwise it is aggregated into a off pixel value, and the corresponding aggregation result is an on pixel value or a off pixel value. The fusion method can be average, and the corresponding grayscale fusion value is the mean of the grayscale values in the window data.
[0151] Furthermore, after traversing the grayscale matrix, the aggregation results after each sliding are spliced into a matrix according to the window sliding order, and the matrix is a binary image.
[0152] Here, the preset size can be determined in combination with actual needs. If it is too large, the object to be displayed may be distorted, and if it is too small, the amount of calculation may increase. For example, the preset size can be 1*1, or 2×2. The preset order is usually from left to right and then from top to bottom, or from top to bottom and then from left to right. The step length in the row direction can be 2, and the step length in the column direction can be 2. Here, when the size of the window is 2×2, the preset order is from left to right and from top to bottom, and the step lengths in the row and column directions are both 2, the size of the binary matrix is 1 / 2 of the grayscale matrix.
[0153] Step 3032: Based on the first display size, scale the binary image to obtain a first control image adapted to the first display size.
[0154] Considering that the number of rows and columns of a binary image is usually larger than the number of rows and columns in the first display size; since the resolution of the dot matrix display screen 202 is relatively low, the embodiment of the present invention ensures that the first control image can be as close as possible to the actual situation of the object to be displayed by pixel aggregation of the binary image.
[0155] According to a feasible implementation manner, pixel aggregation of a binary image may be implemented specifically through the following implementation manner.
[0156] (1) Based on the size of the binary matrix and the size of the display rectangle, determine the size of the window, the preset order, the step length in the row direction, and the step length in the column direction.
[0157] (2) A binary matrix is traversed through a window of a preset size in a preset order, with a step size in the row direction and a step size in the column direction to achieve pixel aggregation, thereby obtaining a binary matrix with a smaller matrix size (referred to as an aggregated binary matrix for ease of description and distinction).
[0158] (3) Determine whether the size of the binary matrix after aggregation is the size of the display rectangle. If so, execute (4); if not, execute (5).
[0159] (4) The aggregated binary matrix is determined as the image to be rendered.
[0160] (5) Replace the binary matrix with the aggregated matrix and execute (1).
[0161] In one example, for each sliding, pixel aggregation of the window may be implemented in the following manner.
[0162] Determine the window data of the window on the binary matrix, perform pixel aggregation through the decision tree, and obtain an aggregation result; here, the aggregation result is an on pixel value or a off pixel value; that is, the window data is aggregated into an on pixel value or a off pixel value.
[0163] It is worth noting that, considering the high requirements of the embodiments of the present invention for pixel aggregation, the effect of pixel aggregation of a single decision tree is limited, and it may not be possible to ensure that the pixel aggregation can reflect the actual situation of the object to be displayed. Therefore, in practical applications, pixel aggregation of window data can be performed through multiple decision trees to obtain an aggregation result.
[0164] In a specific implementation, the results of the decisions made by multiple decision trees can be determined (for ease of description and distinction, they can be referred to as decision results, which are either on pixel values or off pixel values). The number of different decision results is counted, and the decision result with the largest number is taken as the aggregated result. It should be noted that in actual applications, different decision trees can be set for different character types; for example, characters of different character types can be text, symbols, and graphics; and different decision trees can be set for different image types, for example, different image types can be human images, traffic signs, and animal images.
[0165] Here, the decision logics of multiple decision trees are different, so that pixel aggregation can be achieved from different angles to ensure the effect of pixel aggregation. The decision logic of a decision tree is explained below.
[0166] The decision logic of the decision tree can be: when the number of pixel values representing black in the window data is large, the window data is aggregated into on pixels, and the on pixels represent a pixel and the pixel value of the pixel is the on pixel value; or, when the number of pixel values representing black in the window data is small, if the number of pixel values representing black in the adjacent data on one side of the binary matrix of the window data is large, the window data is aggregated into on pixels, otherwise it is off pixels, and the off pixels represent a pixel and the pixel value of the pixel is the off pixel value.
[0167] Here, the preset size can be determined in combination with actual needs. If it is too large, the object to be displayed may be distorted, and if it is too small, the amount of calculation may increase. For example, the preset size can be 2×2. The preset order is usually from left to right and then from top to bottom, or from top to bottom and then from left to right. The step length in the row direction can be 2, and the step length in the column direction can be 2.
[0168] For example, when the size of the window is 2×2, the turned-on pixels represent black pixels, and the turned-off pixels represent white pixels; Figure 6a As shown, the decision logic of the decision tree can be:
[0169] Determine whether the window data contains 4 completely black pixels. If so, display that the window data is aggregated into black pixels. Figure 6b As shown, the rectangular frame 2 is aggregated into 1 black pixel.
[0170] If not, determine whether the window data contains 3 completely black pixels. If yes, display that the window data is aggregated into black pixels. Figure 6b As shown, the rectangular frame 8 is aggregated into one black pixel.
[0171] If not, determine whether the window data contains 2 completely black pixels. If not, do not display it, and the window data is aggregated into black pixels. Figure 6b As shown, the rectangular frames 5 and 3 are aggregated into one white pixel.
[0172] If yes, check whether the right side contains 2 completely black pixels. If yes, display the window data as black pixels. Figure 6b As shown, the rectangular frame 9 is aggregated into one black pixel.
[0173] If not, determine whether the lower part contains 2 completely black pixels. If so, display the window data as black pixels. Figure 6b As shown, the rectangular frame 4 is aggregated into one black pixel.
[0174] If not, it is not displayed and the window data is aggregated into black pixels. Figure 5b As shown, the rectangular frames 6 and 7 are aggregated into one black pixel.
[0175] In summary, when the number of pixels representing black in the window data is greater than or equal to 3, the window data is aggregated into black pixels; when the number of pixels representing black in the window data is less than 3, if the two adjacent pixels on the right side of the window represent black, or if the two adjacent pixels at the bottom of the window represent black, the window data is aggregated into black pixels.
[0176] Specifically, the first information of the window data is counted according to the first vector [a1, a2, a3, a4, a5, a6, a7, a8, a9], where a1 represents the number of completely black pixels, a2 represents the number of completely black pixels on the left, a3 represents the number of completely black pixels on the right, a4 represents the number of completely black pixels at the bottom, a5 represents the number of completely black pixels at the top, a6 represents whether the two pixels on the left are completely black, a7 represents whether the two pixels on the right are completely black, a8 represents whether the two pixels at the top are completely black, and a9 represents whether the two pixels at the bottom are completely black. When the statistical result of a1 is greater than or equal to 3, when the statistical result of a1 is less than 3, and the statistical result of a6 or a8 is yes, the pixels are aggregated into black pixels; otherwise, they are aggregated into white pixels.
[0177] In addition, in some possible cases, the electronic device 100 can display a first control image, and the user can operate the first control image to change the pixel values of the pixels in the image, for example, clicking on a black pixel will turn it into a white pixel; clicking on a white pixel will turn it into a white pixel, and the final first control image is obtained.
[0178] The embodiment of the present invention performs binarization and pixel aggregation on a bitmap image to output a first control image adapted to the size of the area where the object to be displayed is displayed on a dot matrix display screen.
[0179] exist Figure 5b A flow chart of a display control method provided by an embodiment of the present invention is shown.
[0180] like Figure 5b As shown, the object to be displayed is a string, the string includes multiple characters, and the bitmap image includes bitmap images corresponding to the multiple characters. Figure 3 Step 303 shown includes at least the following steps:
[0181] Step 3033: determine the character size; wherein the character size indicates the size of the area on the dot matrix display screen where the character is displayed.
[0182] Here, the character size is the size of the character. Here, the character size can be a default one or a setting by the user through the electronic device 100. The character size can be understood as the first display size when the object to be displayed is a character. For details, see the description of the first display size when the object to be displayed is a character.
[0183] Step 3034: Based on the character size, the bitmap images corresponding to the multiple characters are processed respectively to obtain character control images corresponding to the multiple characters that are adapted to the character size.
[0184] Specifically, for each character in the string, based on the character size, the bitmap image corresponding to the character is processed to obtain a character control image adapted to the character size. When the bitmap image is not a binary image, the first display size in the above step 3031 and step 3032 is replaced with the character size, and the bitmap image corresponding to the character is processed to obtain a character control image; when the bitmap image is a binary image, the first display size in the above step 3032 is replaced with the character size, and the bitmap image corresponding to the character is processed to obtain a character control image.
[0185] Step 3035: splice the character control images corresponding to the multiple characters to determine a first control image adapted to the first display size of the character string.
[0186] Specifically, based on the number of characters in the string (referred to as the number of characters for ease of description and distinction), the number of strings columns, row spacing, and column spacing, the character control images corresponding to multiple characters are spliced to obtain a first control image adapted to a first display size of the string.
[0187] Here, the number of columns of the first display size is less than or equal to the number of columns of the second display size.
[0188] The number of columns of the first display size is the total number of columns of the character string, and the total number of columns of the character string is the product of the number of columns of the character size and the number of characters, plus the column spacing between characters in different columns.
[0189] The number of rows of the first display size is the total number of rows of the string, and the total number of rows of the string is the product of the number of rows of the character size and the number of rows of the string, plus the line spacing between characters in different rows. Here, the number of rows of the string is determined based on the result of dividing the number of columns of the string and the number of characters. If the result is an integer, the result is the number of rows of the string; if the result is not an integer, the integer of the result plus 1 is the number of rows of the string.
[0190] It is worth noting that the number of character string columns, row spacing, and column spacing may be manually preset in the electronic device 100, or may be set by the user through the electronic device 100. It is worth noting that if the user does not set the number of character string columns, the electronic device 100 may use the sum of the number of character columns and the column spacing, divided by the number of columns of the second display size, as the integer resulting from the division as the number of character string columns.
[0191] It should be noted that when the object to be displayed is a character, when the bitmap image of the character is not a binary image, the first display size in the above steps 3031 and 3032 is replaced by the character size, and the bitmap image corresponding to the character is processed to obtain a first control image; when the bitmap image is a binary image, the first display size in the above step 3032 is replaced by the character size, and the bitmap image corresponding to the character is processed to obtain a first control image.
[0192] In this solution, by splicing character control images, the layout of multiple characters in a character string can be flexibly designed to meet the needs of various scenarios.
[0193] exist Figure 7 A flow chart of a display control method provided by an embodiment of the present invention is shown.
[0194] like Figure 7 As shown, in Figure 3 After step 303 shown, at least the following steps are included:
[0195] Step 701: when there are multiple objects to be displayed, determine position information corresponding to the multiple objects to be displayed; the position information indicates the area where the first control image corresponding to each of the multiple objects to be displayed is displayed on the dot matrix display screen.
[0196] For example, assuming that the multiple objects to be displayed are multiple characters, the position information may be character numbers, and the character numbers indicate the order of the multiple characters.
[0197] For example, assuming that the multiple objects to be displayed are strings and images, the position information may be the position coordinates obtained by mapping the first control image of the string and the image to the same coordinate system, for example, the coordinates between the four corner points of the string and the four corner points of the image. Here, the coordinate system may be the coordinate system of the dot matrix display screen 202.
[0198] For example, assuming that the multiple objects to be displayed are a string and a video, the position information may be the position coordinates obtained by mapping the first control image of the string and the video to the same coordinate system, for example, the coordinates between the four corner points of the string and the four corner points of the video. Here, the coordinate system may be the coordinate system of the dot matrix display screen 202, or may be the coordinate system of the display screen of the electronic device.
[0199] Step 702: Send the position information and the first control images corresponding to the multiple objects to be displayed to the dot matrix display, instructing the dot matrix display to display the multiple objects to be displayed based on the position information and the first control images corresponding to the multiple objects to be displayed.
[0200] Specifically, the dot matrix display can establish corresponding relationships between the first control images of the multiple objects to be displayed and different light-emitting devices based on the position information of the multiple objects to be displayed, and based on this, control the light-emitting devices to emit colors to display the multiple objects to be displayed.
[0201] In an embodiment of the present invention, the electronic device 100 generates a first control image adapted to the display size of the object to be displayed. When there are multiple objects to be displayed, the position information of each of the multiple first control images can be determined, and the first control image and the position information can be output to the dot matrix display to display the multiple objects to be displayed.
[0202] exist Figure 8 A flow chart of a display control method provided by an embodiment of the present invention is shown.
[0203] like Figure 8 As shown, in Figure 3 After step 303 shown, at least the following steps are included:
[0204] Step 801: when there are multiple objects to be displayed, determine position information corresponding to the multiple objects to be displayed; the position information indicates the area where the first control image corresponding to each of the multiple objects to be displayed is displayed on the dot matrix display screen.
[0205] For details, please refer to the description of step 701 above and will not be repeated here.
[0206] Step 802: Based on the position information and the second display size of the dot matrix display, the first control images of the plurality of objects to be displayed are processed to determine a second control image adapted to the second display size of the dot matrix display.
[0207] Here, the second display size of the dot matrix display is the size of the dot matrix display screen 202 in the dot matrix display 200 , which is represented by the number of rows and columns of the dot matrix display screen 202 .
[0208] Specifically, a blank image of a second display size of the dot matrix display is determined, and first control images corresponding to the plurality of images to be displayed are filled into the blank image based on position information corresponding to the plurality of objects to be displayed, so as to obtain a second control image.
[0209] Step 803: Send the second controller image to the dot matrix display, instructing the dot matrix display to display a plurality of objects to be displayed based on the second control image.
[0210] Specifically, the dot matrix display can establish a correspondence between the second control image and different light-emitting devices, and based on this, control the light-emitting devices to emit colors to display multiple objects to be displayed.
[0211] In an embodiment of the present invention, the electronic device 100 generates a first control image adapted to the display size of the object to be displayed. When there are multiple objects to be displayed, the position information of each of the multiple objects to be displayed can be determined, and based on the position information, the multiple first control images are converted into a second control image adapted to the display size of the dot matrix display, and the second control image is output to the dot matrix display to display the multiple objects to be displayed.
[0212] The following describes a practical application scenario of the display control method provided by an embodiment of the present invention.
[0213] In a specific implementation, the electronic device 100 displays a first page, and the user can operate the first page to obtain the user's operation information. Based on the user's operation information, the electronic device 100 can obtain the first data, and can also obtain the first display size, position information of multiple objects to be displayed, a first control image, and a second control image.
[0214] like Figure 9a As shown, the first page includes a dot matrix display selection area 901, a solution area 902, an image address input box 903, an image submit button 904, an image thumbnail area 905, an image size input box 906, a video address input box 907, a video submit button 908, a video thumbnail area 909, a video size input box 910, a string input box 911, a font 912, a character size input box 913, a canvas size input box 914, a preview button 915, a submit button 916, a stitching button 917, a preview list 918, and a preview area 919.
[0215] Optionally, the dot matrix display selection area 901 has an input box, and the user can enter the address of the dot matrix display in the input box, or click the input box to display a drop-down list of dot matrix displays for selecting a dot matrix display in the list.
[0216] Optionally, the solution area 902 displays a plurality of solutions, which are used to process the above bitmap image to obtain a first control image. Figure 9a Scheme 1, Scheme 2, Scheme 3, ... are shown. Scheme 1 may be the decision tree pixel aggregation scheme described above, and Scheme 2 may be a scheme for manually operating the first control image. Although only two schemes are shown in the embodiment of the present invention, in practical applications, different schemes may be designed according to different requirements. In addition, these schemes may also be divided into text schemes, image schemes, and video schemes.
[0217] Optionally, the user can input the address of the image in the image address input box 903. It can be a local image address or a remote image address. In this way, the electronic device 100 can obtain the identification of the image.
[0218] Optionally, the user can click the image submission button 904 to jump to the image selection page and select an image. Afterwards, the electronic device 100 can display thumbnails of the uploaded pictures in the image thumbnail area 905.
[0219] Optionally, the user may input an image size 906 in the image size input box. If the user does not input an image size, the image size is a default size, which is the size of the dot matrix display screen 202 in the dot matrix display 200 selected by the user.
[0220] Optionally, the user can input the address of the image in the video address input box 907. It can be a local video address or a remote video address. In this way, the electronic device 100 can obtain the identification of the video.
[0221] Optionally, the user can click the video submission button 908 to jump to the video selection page and select a video. Afterwards, the electronic device 100 can display the thumbnail of the uploaded video in the video thumbnail area 909.
[0222] Optionally, the user can enter the video size in the video size input box 910. If the user does not enter the video size, the video size is a default size, which is the size of the dot matrix display screen 202 in the dot matrix display selected by the user. Here, the video size can be understood as the size of the image in the video, and the size of each image in the video is the same.
[0223] Optionally, the user can input a string in the string input box 911. In this way, the electronic device 100 can obtain the string identifier, or the character identifier of each character in the string. Here, the string identifier is composed of the character identifier of each character in the string.
[0224] Optionally, the user can click font 912 to display a font list, and the user can select a font in the font list. If the user does not select a font, the font is a default font, such as Microsoft YaHei.
[0225] Optionally, the user can enter the character size in the character size input box 913. If the user does not enter the character size, the character size is a default size, and the default size of the character is the size of the dot matrix of the dot matrix display screen 202 in the dot matrix display selected by the user; in actual application, the input box for the number of character string columns, the input box for the column spacing, and the input box for the line spacing can also be set to obtain the number of character string columns, the column spacing, and the line spacing. In addition, the input box for the number of character string rows, the input box for the column spacing, and the input box for the line spacing can also be set to obtain the number of character string rows, the column spacing, and the line spacing.
[0226] Optionally, the user can enter a canvas size in the canvas size input box 914. If the user does not enter a canvas size, the canvas size is a default size, which can be determined in combination with actual needs. The canvas size is usually larger than the size of the dot matrix display screen 202 in the dot matrix display 200 selected by the user.
[0227] Optionally, the user can click the preview button 915, and the first control image corresponding to any one of the image indicated by the image address input by the user, the uploaded image, the video indicated by the video address, the uploaded video, and the character string is displayed in the preview area 919. The preview area 919 displays a first control image, or a video formed by multiple first control images; it is worth noting that when the user displays any multiple contents of the image indicated by the image address input by the user, the uploaded image, the video indicated by the video address, the uploaded video, and the character string, the preview list 918 displays thumbnails of the first control images displayed in the preview area 919 for each of the multiple contents.
[0228] It is worth noting that, optionally, when the first control image represents a character string, at this time, the first control image can be understood as a text box, and the user can operate the length and width of the first control image and the position of the characters in each line in the preview area 919, thereby automatically adjusting the layout of the characters in the character string while keeping the size and order of the characters unchanged.
[0229] Further, when the submit button 916 is clicked, the first control image currently displayed in the preview area 919 can be uploaded to the dot matrix display selected by the user. It is worth noting that the thumbnail can be a thumbnail of an image or a thumbnail of a video. The following is a method for modifying the first control image sequence of a video. The details are as follows:
[0230] When the video is displayed in the preview area 919, a modification button can be set in the preview area. If the user wants to modify the first control image of the video, he can click to pause the video playback, and then click the modification button. The preview area displays a left move button and a right move button. The user clicks the left move button, and the preview area displays the first control image of the previous frame of the currently displayed first control image. The user clicks the right move button, and the preview area displays the first control image of the next frame of the currently displayed first control image. The user can click the first control image currently displayed in the preview area to change the pixel value of the pixel; after the modification is completed, the user can click the modification button again and click the first control image to resume video playback.
[0231] Optionally, the preview list 918 is used to display thumbnails of the previewed first control images. The user can click on a thumbnail in the preview list 918 to display the first control image corresponding to the thumbnail in the preview area 919. The user can also delete the thumbnails in the preview list 918.
[0232] Optionally, the user can click the splice button 914 to jump to the Figure 9b The second page shown is provided with a combination area 920, a preview button 921, a preview area 922, and a submit button 923. The user can drag the thumbnails in the preview list 918 to the combination area 920 for combination. The user can click the preview button 921 to display the image corresponding to the combined preview thumbnails in the preview area 922. The image can be a second control image or a first control image corresponding to each of the multiple objects to be displayed. In addition, the user can operate the image displayed in the preview area 922 to change the pixel value of the pixel in the image. When the user clicks the submit button 923, the image displayed in the preview area 922 can be uploaded to the dot matrix display selected by the user. It should be noted that, optionally, the size of the preview area 922 and the dot matrix display screen 202 are adapted; therefore, the coordinate information of the first control image of each of the multiple objects to be displayed in the preview area 922 is the above-mentioned position information. Optionally, the size of the preview area 922 is N times the size of the dot matrix display screen 202. For example, the number of rows of the preview area 922 is N times the number of rows of the dot matrix display screen 202, and the number of columns of the preview area 922 is N times the number of columns of the dot matrix display screen 202; therefore, the coordinates *N of the first control image of each of the multiple objects to be displayed in the preview area 922 are the above-mentioned position information.
[0233] It should be noted that the first page and the second page are only used as examples. In actual applications, the content and layout of the first page and the second page can be reasonably designed in combination with actual needs. For example, an input selection box is displayed on the first page. The user clicks the input selection box to display a list including character strings, images and videos. The user clicks on a character to display the input box 911, font 912, and character size input box 913 of the above-mentioned character string; clicks on an image to display the address input box 903, image submission button 909, image thumbnail area 905, and image size input box 909 of the above-mentioned image; clicks on a video to display the address input box 909, video submission button 908, video thumbnail area 909, and video size input box 910 of the above-mentioned video.
[0234] Based on this, in a possible scenario, the user can display the user input string through the electronic device 100, and the electronic device 100 generates a bitmap image of the string in the process of displaying the string. In order to reduce the amount of data processing, the bitmap image of the object to be displayed mentioned in the embodiment of the present invention can be a bitmap image generated in the process of the electronic device 100 displaying the string.
[0235] In a possible scenario, a user may display a user input string through the electronic device 100, and the electronic device 100 generates a bitmap image of the string in the process of displaying the string. Considering that the size of the bitmap image generated in the process of the electronic device 100 displaying the string may be too large or too small, the electronic device 100 may call the rendering module described in the above step 302 to regenerate the bitmap image of the string based on the relevant information obtained in the process of displaying the string (generally the identification and storage data of the string).
[0236] In another possible scenario, the user can input an image address, a video address, upload an image or upload a video through the electronic device 100, and correspondingly, the electronic device 100 can obtain the identification of the image or video. The bitmap image of the object to be displayed mentioned in the embodiment of the present invention can be a bitmap image generated by the electronic device 100 calling the above rendering module based on the identification of the image or video.
[0237] Next, combine Figure 2 , Figure 9a and Figure 9b , a display control method provided by an embodiment of the present invention is described in detail by way of example. The embodiment of the present invention mainly provides a display control method for a string, an image, and a video.
[0238] Example 1: The object to be displayed is a string. Fig.10 FIG. 1 is a flow chart of a method for controlling the display of a character string provided by an embodiment of the present invention. Figure 7 As shown, the display control method of the character string includes the following steps.
[0239] Step 1001: The electronic device 100 displays a first page.
[0240] For details on the first page, see Figure 9a And the above Figure 9a Description.
[0241] According to a feasible implementation, the client 101 is installed on the electronic device 100 , and the user accesses the client 101 through the electronic device 100 to display the first page.
[0242] According to a feasible implementation, the electronic device 100 is installed with a browser, and the user can access the client 101 through the browser, and the client 101 displays the first page; for example, the user enters a URL in the browser to access the client 101.
[0243] For example, when a user first accesses the client 101, he / she will first enter the client's login page, operate the login page to register an account, manually set an account and password, and obtain an account and password that can access the client 101; then, the user enters the account and password on the login page to log in to the client 101 to access and use the various services provided by the client 101. Of course, the user can repeatedly log in to the client 101 using the account and password.
[0244] Step 1002: The electronic device 100 determines the string identifier, character size, number of string columns, column spacing, and row spacing corresponding to the information input by the user on the first page based on the user's operation on the first page.
[0245] Here, the operation information in step 3011 indicates the user's operation on the first page.
[0246] The string identifier includes the character identifier of each character in the string (ie, the first identifier described in step 301 ). The electronic device 100 can specifically determine the string identifier through the following two implementation methods.
[0247] According to a feasible implementation, the user may input a character string to be displayed through a mechanical keyboard or a virtual key of the electronic device 100, so that the electronic device 100 obtains a character string identifier.
[0248] According to another feasible implementation, the user can speak out the character string that he wants to display, and the microphone of the electronic device 100 collects and recognizes the user's voice signal to obtain a recognized character string identifier.
[0249] In some feasible implementations, the function of adding a new page is set in the electronic device 100, for example, by setting a button, or receiving a voice, or receiving a gesture instruction, etc. to obtain the operation of the user triggering the function of adding a new page, which is not limited to the examples given. In response to the user triggering the function of adding a new page, the electronic device 100 displays a page for obtaining the object to be displayed, for example, in the form of a pop-up window. An input box can be set in the page for obtaining the object to be displayed, or user input information can be obtained through voice, etc., so as to obtain a string identifier.
[0250] The electronic device 100 can specifically determine the character size through the following two implementation methods.
[0251] According to a feasible implementation, the user may input the desired character size through the mechanical keyboard or virtual keys of the electronic device 100, so that the electronic device 100 obtains the character size.
[0252] According to a feasible implementation, if the user does not input a desired character size through the electronic device 100 , the electronic device 100 may use a default character size as the character size.
[0253] In practical applications, the input boxes for the number of character string columns, the column spacing, and the row spacing may be used. Alternatively, the default number of character string columns, column spacing, and row spacing of the electronic device 100 may be used directly. For example, the column spacing and row spacing may be 0.
[0254] Step 1003: The electronic device 100 displays the character string input by the user on the first page based on the character string identifier.
[0255] exist Figure 9a The character string is displayed in the character string input box on the first page shown.
[0256] Step 1004 : The electronic device 100 generates and displays a first control image corresponding to the character string identifier based on the user's preview operation on the first page, the character size, the number of character string columns, the column spacing, and the line spacing.
[0257] Here, the preview operation can be Figure 9a The preview button 915 is clicked on the first page shown.
[0258] Specifically, after obtaining the user's preview operation, first, the string identifier is decomposed to obtain a character identifier array.
[0259] Specifically, in an embodiment of the present invention, when the string identifier obtained by the user input consists of m character identifiers, m.split('') can be used to decompose the string identifier m, and finally m is decomposed into several character identifiers, and all the decomposed character identifiers constitute a character identifier array, which corresponds to the string identifier. For example, when the character string represented by the barrage string identifier to be displayed is "Please turn right", the character array represented by the character identifier array obtained after decomposing the barrage string identifier to be displayed is ['please', 'right', 'turn']. It should be noted that the character identifier is a character code and a font.
[0260] Secondly, the electronic device 100 uses each character identifier in the character identifier array, the brush color, the identifier of the rendering module, the character size, the number of character string columns, the column spacing, and the row spacing as parameter values of the input parameters to generate a rendering request, and based on the rendering request, calls the rendering module of the operating system to generate and display the first control image. For example, in Figure 9aThe preview area 919 on the first page shown displays the first control image. Specifically, a character control image of each character in the string can be generated based on the character size, and then spliced according to the number of strings, column spacing, and row spacing to obtain the first control image. Here, the detailed process of generating the first control image is described in the above description of steps 3033 to 3034.
[0261] Step 1005: The electronic device 100 obtains a modification operation on the first control image to obtain an updated first control image.
[0262] Here, the user Figure 9a The first control image displayed in the preview area 919 on the first page shown is clicked, thereby changing the black pixels into white pixels and the white pixels into black pixels.
[0263] In addition, the number of characters in the rows and columns of the first control image can also be adjusted. Furthermore, the user can also change the spacing between rows, the position of each line of text, centering, left, right, etc.
[0264] Step 1006: The electronic device 100 converts the updated first control image into a second control image based on the user's submission operation on the first page.
[0265] Specifically, the electronic device 100 determines a blank image of the second display size of the dot matrix display, fills the updated first control image into the middle position of the blank image, and obtains the second control image.
[0266] Step 1007 : The electronic device 100 sends a second control image to the dot matrix display 200 .
[0267] Step 1008 : The dot matrix display 200 displays the character string input by the user based on the second control image.
[0268] Here, the submit operation can be performed by the user in Figure 9a The submit button 916 is clicked on the first page shown.
[0269] It is worth noting that the conversion into the second control image in the above steps 1003, 1005 and 1007 are all optional steps.
[0270] In this solution, the electronic device generates a bitmap image of a character string, so that the dot matrix controller does not need to carry a specific dot matrix font library, and can achieve rapid conversion and output of characters.
[0271] Fig.11 FIG. 1 is a flow chart of a display control of an image provided by an embodiment of the present invention. Fig.11 As shown, the image display control scheme includes the following steps.
[0272] Step 1101: The electronic device 100 displays a first page.
[0273] Step 1102: The electronic device 100 determines an image identifier and an image size based on the user's operation on the first page.
[0274] Here, the image identifier is the storage address of the local image or the storage address of the remote image.
[0275] Specifically, users Figure 9a The image address input box 903 on the first page shown is used to input the storage address of the remote image, so that the electronic device 100 obtains the image identifier. Alternatively, the user clicks Figure 9a The image upload button 904 on the first page is shown to upload a local image, so that the electronic device 100 obtains the image identification.
[0276] Specifically, users Figure 9a The image size input box 904 on the first page is used to input the image size, so that the electronic device 100 acquires the image identifier. If the user does not input the image size, the image size is a default size, such as the second display size of the dot matrix display 200.
[0277] Step 1103: The electronic device 100 displays the image thumbnail on the first page based on the image identifier.
[0278] Specifically, in Figure 6a The image thumbnail area 605 on the first page shown displays image thumbnails.
[0279] Step 1104: The electronic device 100 generates a bitmap image corresponding to the image identifier based on the user's preview operation on the first page.
[0280] Here, the user clicks Figure 9a A preview button 914 is shown on the first page, triggering interaction with the rendering module.
[0281] Specifically, the electronic device 100 uses the image identifier, the identifier of the rendering module, and the canvas size as parameter values of the input parameters to generate a rendering request to call the rendering module to generate a bitmap image.
[0282] Step 1105: The electronic device 100 determines and displays a first control image based on the bitmap image and the image size.
[0283] For details on how the bitmap image obtains the first control image with the adapted image size, please refer to the above description of step 3032. The first display size may be replaced by the image size, and no further details will be given.
[0284] Here, in Figure 9a The preview area 919 on the first page is shown displaying a first control image adapted to the image size.
[0285] Step 1106: The electronic device 100 obtains a modification operation on the first control image to obtain an updated first control image.
[0286] Here, the user Figure 9a The control image displayed in the preview area 919 on the first page shown is clicked to change black pixels into white pixels and white pixels into black pixels.
[0287] Step 1107: The electronic device 100 converts the updated first control image into a second control image based on the user's submission operation on the first page.
[0288] Step 1108 : The electronic device 100 sends a second control image to the dot matrix display 200 .
[0289] Step 1109: The dot matrix display 200 displays an image based on the second control image.
[0290] It is worth noting that the conversion into the second control image in the above steps 1103, 1106 and 1107 are all optional steps.
[0291] In this solution, the client relies on the operating system to generate bitmap images, does not need to carry a specific dot matrix font library, and can achieve rapid conversion and output of images.
[0292] Fig.12 FIG. 1 is a flow chart of a video display control method provided by an embodiment of the present invention. Fig.12 As shown, the video display control scheme includes the following steps.
[0293] Step 1201: The electronic device 100 displays a first page.
[0294] Step 1202: The electronic device 100 determines the video ID and video size based on the user's operation on the first page.
[0295] Here, the video identifier is the storage address of the local video or the storage address of the remote video.
[0296] Specifically, users Figure 9a The video address input box 903 on the first page shown is used to input the storage address of the remote video, so that the electronic device 100 obtains the video ID. Alternatively, the user clicks Figure 9a The video upload button 904 on the first page is shown to upload a local video, so that the electronic device 100 obtains the video ID.
[0297] Specifically, users Figure 9a The video size input box 904 on the first page is used to input the video size, so that the electronic device 100 obtains the video size.
[0298] Step 1203: The electronic device 100 generates a bitmap image sequence corresponding to the video identifier based on the user's submission operation on the first page.
[0299] Specifically, the client 101 uses the video identifier and the identifier of the rendering module as parameter values of the input parameters to generate a rendering request.
[0300] Step 1204: The electronic device 100 determines a first control image sequence based on the bitmap image sequence and the video size.
[0301] For each bitmap image in the bitmap image sequence, a first control image adapted to the video size is obtained based on the bitmap image. For details, see the description of step 3032 above. The first display size is replaced with the video size, which will not be described in detail. After each bitmap image in the bitmap image sequence is completed, the first control image of each bitmap image can be obtained, and the first control image sequence can be further obtained.
[0302] Step 1205: The electronic device 100 obtains a modification operation on the first control image in the first control image sequence to obtain an updated first control image sequence.
[0303] Step 1206: The electronic device 100 converts the updated first control image sequence into a second control image sequence based on the user's submission operation on the first page.
[0304] Step 1207 : The electronic device 100 sends a second control image sequence to the dot matrix display 200 .
[0305] Step 1208: The dot matrix display 200 displays the video based on the second control image sequence.
[0306] It is worth noting that the conversion into the second control image in the above steps 1205 and 1206 are optional steps.
[0307] In this solution, the client relies on the operating system to generate a bitmap image sequence and does not need to carry a specific dot matrix font library, which can achieve fast conversion and output of the video.
[0308] It is worth noting that when there are multiple objects to be displayed, if the above Figure 7 According to the method shown, the multiple objects to be displayed may be composed of characters and / or images, such as characters, character strings, or character strings and images.
[0309] For example, when the multiple objects to be displayed are formed by character strings and images, the above Fig.10 and Fig.11 In the manner shown, the first control images corresponding to the character string and the image are determined, and then the electronic device 100 displays the preview thumbnails of the first control images corresponding to the character string and the image, and the user operates the preview thumbnails to determine the position information of the area where the first control images of the character string and the image are displayed in the dot matrix display screen 202. Then, based on the first control images and position information of the character string and the image, the electronic device 100 splices the first control images of the character string and the image into a second control image and sends it to the dot matrix display 200, so that the dot matrix display 200 displays the character string and the image.
[0310] It is worth noting that when combining a string and an image, the character size of each character in the string remains unchanged, but the area occupied by the string can be changed, thereby adaptively changing the first control image. For example, the length and width of the preview thumbnail of the string can be adjusted to change the area occupied by the string. Specifically, if the string is set next to the image, the length and width of the string can be adjusted to change the area occupied by the string, so that the layout of the string and the image is more reasonable. For the adjustment of the string, please refer to the adjustment of the text box in the prior art.
[0311] For example, when the multiple objects to be displayed are formed by multiple character strings, the above Fig.10 In the manner shown, the first control images corresponding to the multiple character strings are determined, and then the electronic device 100 displays the preview thumbnails of the first control images corresponding to the multiple character strings. The user operates the multiple preview thumbnails to update the first control images of the multiple character strings and determine their position information. Afterwards, based on the first control images and position information of the multiple character strings, the electronic device 100 splices the first control images of the multiple character strings and images into a second control image, and sends it to the dot matrix display 200, so that the dot matrix display 200 displays the multiple character strings.
[0312] Corresponding to the above Figure 8 , then the multiple objects to be displayed may be composed of characters, images, videos and / or character strings, for example, multiple character strings, a character string and an image, a character string and a video, or an image and a video.
[0313] For example, when the multiple objects to be displayed are composed of strings, images and videos, the above Fig.10 , Fig.11 and Fig.12In the manner shown, the first control image corresponding to each of the multiple objects to be displayed is determined, and then the electronic device 100 displays preview thumbnails of the first control images corresponding to each of the multiple objects to be displayed, and the user operates the multiple preview thumbnails to determine the position information of the first control images corresponding to each of the multiple objects to be displayed. Afterwards, the electronic device 100 sends the first control images and position information corresponding to each of the multiple objects to be displayed to the dot matrix display 200, so that the dot matrix display 200 displays the character string, image and video. It should be noted that if the image size, character size, and video size set by the user are not appropriate, they can be adaptively adjusted after operating the multiple preview thumbnails to adapt to the second display size of the dot matrix display screen 202.
[0314] In practical applications, such as Figure 9b As shown, multiple preview thumbnails are displayed in the preview list. The user can drag the preview thumbnails to the combination area 920 for combination, and then click the preview button 921 to display the second control image or the first control images corresponding to the multiple objects to be displayed in the preview area 922.
[0315] Fig.13 This is a schematic diagram of the structure of an electronic device embodiment provided by the present invention. Fig.13 As shown, the electronic device 100 in this embodiment includes: a processor 111, a memory 112, a non-volatile memory 1121, a random access memory 1122, an antenna 1, an antenna 2, a communication module 113, an audio module 114, a speaker 114A, a receiver 114B, a microphone 114C, an earphone interface 114D, a display screen 115, a sensor module 116, a button 117, and a mouse 118.
[0316] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present invention, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0317] Combine the following Fig.13 Some components of the electronic device 100 are introduced in detail.
[0318] The processor 111 may include one or more processors. For example, the processor 111 may include one or more of an application processor (AP), a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). Among them, different processors may be independent devices or integrated into one or more processors. Exemplarily, the processor 111 may process the content to be displayed on the display window of the application on the electronic device 100. Exemplarily, the controller may generate an operation control signal based on the instruction opcode and the timing signal to complete the control of the instruction and the execution of the instruction.
[0319] In one example, the processor 111 may also be provided with a memory for storing instructions and data. In some examples, the memory in the processor 111 is a cache memory. The memory may store instructions or data that the processor 111 has just used or cyclically used. If the processor 111 needs to use the instruction or data again, it may be directly called from the memory to avoid repeated access, reduce the waiting time of the processor 111, and improve the efficiency of the system.
[0320] The memory 112 may include an internal memory for storing computer executable program codes, which include instructions. The processor 111 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory. The internal memory may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), a client, etc. The data storage area may store data created during the use of the electronic device 100 (such as audio signals, phone books, etc.), etc. In addition, the internal memory may include a non-volatile memory 1121, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc., and a random access memory 1122 is generally referred to as a memory. In an embodiment of the present invention, the non-volatile memory 1121 may store the above-mentioned image files, character sets, fonts, operating systems, and clients; during specific operation, the image files, character sets, dot matrix data or vector data in the fonts, the operating system, and the client may be loaded into the random access memory 1122. In addition, the client may provide Figure 9a The first page shown and Figure 9b The second page is shown.
[0321] In one example, the memory 112 also includes an external memory card connected via an external memory interface, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 111 via the external memory interface to implement a data storage function, such as storing files such as music and videos in the external memory card.
[0322] The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the communication module 113, the modem and the baseband processor, etc. The communication module includes a wireless communication module and a wired communication module.
[0323] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other examples, the antenna can be used in combination with a tuning switch.
[0324] The mobile communication module can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module may receive electromagnetic waves by at least two antennas including antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modem for demodulation. The mobile communication module may also amplify the signal modulated by the modem, and convert it into electromagnetic waves for radiation through antenna 1. In some examples, at least some functional modules of the mobile communication module may be arranged in the processor 111. In some examples, at least some functional modules of the mobile communication module may be arranged in the same device as at least some modules of the processor 111.
[0325] The wireless communication module can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module can be one or more devices integrating at least one communication processing module. The wireless communication module receives electromagnetic waves via antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signals to processor 111. The wireless communication module can also receive the signal to be sent from processor 111, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through antenna 2.
[0326] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 114 , the speaker 114A, the receiver 114B, the microphone 114C, the headphone jack 114D, and the application processor.
[0327] The audio module 114 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 114 can also be used to encode and decode audio signals. In some examples, the audio module 114 can be arranged in the processor 111, or some functional modules of the audio module 114 can be arranged in the processor 111.
[0328] The speaker 114A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 114A.
[0329] The receiver 114B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 114B close to the human ear.
[0330] Microphone 114C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 114C to input the sound signal into the microphone 114C. The electronic device 100 can be provided with at least one microphone 114C. In other examples, the electronic device 100 can be provided with two microphones 114C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 114C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.
[0331] The earphone interface 114D is used to connect a wired earphone and can be a USB interface 130, or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0332] The electronic device 100 implements the display function through a GPU, a display screen 115, a memory 112, a digital-to-analog converter, and an application processor. The GPU is a microprocessor for image processing, which is connected to the display screen 115 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 111 may include one or more GPUs, which execute program instructions to generate or change display information. The memory 112 includes a video memory, which is used to store data processed by the GPU or data processed by the application processor, and the data represents information that can be output to each pixel on the display screen 115; the video memory can be independent and does not need to occupy the random access memory 1122; it can also share part of the random access memory 1122 as video memory; it can also be an independent video memory and a part of the shared random access memory 1122. The digital-to-analog converter is used to convert the video memory data into an analog signal, and the display screen 115 is used to realize display based on the analog information. It is worth noting that the display screen 115 can display the information provided by the client. Figure 9aThe first page shown and Figure 9b The second page is shown.
[0333] Specifically, the display screen 115 is used to display images, videos, etc. The display screen 115 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some examples, the electronic device 100 may include one or more display screens 115. In one example, the display screen 115 can be used to display an interface of an application, a display window of an application, etc.
[0334] The sensor module 116 may include a camera, a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc. Here, the touch sensor is also called a "touch panel". The touch sensor can be set on the display screen 115, and the touch sensor and the display screen 115 form a touch screen, also called a "touch screen". The touch sensor is used to detect touch operation data acting on or near it. The touch sensor can pass the detected touch operation data to the application processor to determine the type of touch event. Visual output related to the touch operation data can be provided through the display screen 115.
[0335] In addition, the electronic device 100 may also include external input devices such as a key 117 and a mouse 118. The key 117 includes a power button, a volume button, an input keyboard, etc. The key may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.
[0336] It is worth noting that, here, the electronic device 100 has a display screen 115. Optionally, the display screen 115 can be directly operated, and specifically, the electronic device can be a mobile phone, a tablet, or other device. Optionally, the electronic device 100 is connected to an external operating device such as a keyboard 117 and a mouse 118, and data is input through the keyboard 117, and the content displayed on the display screen 115 is operated through the mouse 118. Specifically, the electronic device 100 can be a terminal device such as a notebook or a desktop computer.
[0337] It is worth noting that the display screen 115 of the electronic device 100 and the dot matrix display screen 202 have significant differences. The resolutions of the display units in the display screen 115 of the electronic device 100 and the dot matrix display screen 202 under the same matrix size are significantly different. The resolution of the display screen 115 of the electronic device 100 is relatively high, and the higher the resolution, the clearer the displayed content. Therefore, the display principle of the electronic device 100 and the display principle of the dot matrix display 200 are significantly different. The embodiment of the present invention obtains a control image adapted to the dot matrix display 200 by utilizing the image processing function and rendering function of the electronic device 100, so that the display content of the dot matrix display screen 202 in the dot matrix display 200 can be flexibly controlled, and is no longer limited by the resources of the dot matrix display 200 itself.
[0338] In addition to the above method and electronic device, an embodiment of the present invention may also provide a computer program product, which includes computer program instructions, which, when executed by a processor, cause the processor to execute the steps in the display control method according to various embodiments of the present invention described in the above "Method" section of this specification. Wherein, the computer program product can be written in any combination of one or more programming languages to perform computer program codes for performing operations of the embodiments of the present invention, and the programming languages include object-oriented programming languages, such as Java, C++, etc., and also include conventional procedural programming languages, such as "C" language or similar programming languages. Wherein, the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer program code can be executed completely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on the remote computing device, or completely on the remote computing device or server.
[0339] In addition, an embodiment of the present invention may also provide a computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the processor executes the steps in the display control method according to various embodiments of the present invention described in the "Method" section above. The computer-readable storage medium may adopt any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0340] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0341] The basic principle of the present invention is described above in conjunction with specific embodiments. However, it should be pointed out that the advantages, strengths, effects, etc. mentioned in the present invention are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. must be possessed by each embodiment of the present invention. In addition, the specific details disclosed above are only for the purpose of illustration and facilitation of understanding, rather than limitation, and the above details do not limit the present invention to being implemented by adopting the above specific details.
[0342] The block diagrams of the devices, apparatuses, equipment, and systems involved in the present invention are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The word "such as" used here refers to the phrase "such as but not limited to", and can be used interchangeably with it.
[0343] It should also be noted that in the device, apparatus and method of the present invention, each component or each step can be decomposed and / or reassembled, and such decomposition and / or reassembly should be regarded as an equivalent solution of the present invention.
[0344] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present invention to the forms disclosed herein. Although a number of example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.
[0345] It should be understood that the various numerical numbers involved in the embodiments of the present invention are only used for the convenience of description and are not used to limit the scope of the embodiments of the present invention.
Claims
1. A display control method, characterized in that: The method comprises: The electronic device determines first data, where the first data is used to indicate an object to be displayed; The electronic device generates a bitmap image of the object to be displayed based on the first data; The electronic device determines a first control image adapted to a first display size based on the bitmap image; the pixel value of each pixel in the first control image indicates a display color value of a light-emitting device in a dot matrix display, the dot matrix display includes a dot matrix display screen composed of a plurality of the light-emitting devices, and the first display size indicates a size of an area on the dot matrix display screen displaying the object to be displayed; The electronic device sends the data of the first control image to the dot matrix display, instructing the dot matrix display to control the display color value of the light emitting device based on the data of the first control image, so as to realize the display of the object to be displayed.
2. The method according to claim 1, characterized in that The first data is a first identifier of the object to be displayed, or the first data is description data of the object to be displayed.
3. The method according to claim 2, characterized in that: The object to be displayed is a character, the first identifier is a character code and a font, and the description data is a bitmap image or vector data representing the character; or, The object to be displayed is an image, the first identifier is an image storage address, and the description data is an image file, or data after decoding the image file.
4. The method according to claim 1, characterized in that: The method further comprises: The electronic device obtains user operation information; The electronic device determines the first data based on the operation information of the user.
5. The method according to claim 1, characterized in that The object to be displayed is a character string, the character string includes a plurality of characters, the bitmap image includes bitmap images corresponding to the plurality of characters, and the electronic device determines a first control image adapted to a first display size based on the bitmap image, including: The electronic device determines the character size; wherein the character size indicates the size of the area on the dot matrix display screen where the character is displayed; The electronic device processes the bitmap images corresponding to the plurality of characters respectively based on the character size to obtain character control images corresponding to the plurality of characters respectively adapted to the character size; The electronic device splices the character control images corresponding to the plurality of characters to determine a first control image adapted to a first display size of the character string.
6. The method according to claim 1, characterized in that When the bitmap image is not a binary image, the electronic device determines a control image adapted to a first display size based on the bitmap image, including: The electronic device binarizes the bitmap image to obtain a binary image; The electronic device scales the binary image based on a first display size to obtain a first control image adapted to the first display size.
7. The method according to claim 6, characterized in that The electronic device scales the binary image to obtain a control image adapted to the first display size, including: The electronic device determines at least one decision tree for the object to be displayed; wherein the at least one decision tree is used to perform pixel aggregation on the first window data of the first window on the binary image; The electronic device performs pixel aggregation on the first window data in the process of the first window traversing the binary image through the at least one decision tree to obtain a control image adapted to the first display size.
8. The method according to claim 1, characterized in that: The method further comprises: When there are multiple objects to be displayed, the electronic device determines position information corresponding to the multiple objects to be displayed; the position information indicates an area on the dot matrix display screen where the first control image corresponding to each of the multiple objects to be displayed is displayed; The electronic device sends the position information and the first control images corresponding to the plurality of objects to be displayed to the dot matrix display, instructing the dot matrix display to display the plurality of objects to be displayed based on the position information and the first control images corresponding to the plurality of objects to be displayed; or The electronic device processes the first control images corresponding to the plurality of objects to be displayed based on the position information and the second display size of the dot matrix display, and determines a second control image adapted to the second display size; The electronic device sends the second controller image to the dot matrix display, instructing the dot matrix display to display the multiple objects to be displayed based on the second control image.
9. An electronic device, characterized in that: include: at least one memory for storing a program; At least one processor is used to execute the program stored in the memory. When the program stored in the memory is executed, the processor is used to execute the method according to any one of claims 1 to 8.
10. A display system, characterized in that: The system comprises an electronic device and a dot matrix display, wherein the electronic device is used to execute the method according to any one of claims 1-8.
Citation Information
Patent Citations
LED display control system
CN204406962U