CN105867729B - Message display device and method - Google Patents

Message display device and method Download PDF

Info

Publication number
CN105867729B
CN105867729B CN201610177912.5A CN201610177912A CN105867729B CN 105867729 B CN105867729 B CN 105867729B CN 201610177912 A CN201610177912 A CN 201610177912A CN 105867729 B CN105867729 B CN 105867729B
Authority
CN
China
Prior art keywords
miniature
picture
message
grayscale image
gray value
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610177912.5A
Other languages
Chinese (zh)
Other versions
CN105867729A (en
Inventor
张勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nubia Technology Co Ltd
Original Assignee
Nubia Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201610177912.5A priority Critical patent/CN105867729B/en
Publication of CN105867729A publication Critical patent/CN105867729A/en
Application granted granted Critical
Publication of CN105867729B publication Critical patent/CN105867729B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of message display devices, which includes: acquisition module, when for receiving message, obtain the screenshot of mobile terminal display interface, divide the screenshot and obtain each local picture;Processing module obtains the average gray value of each local picture for each local picture to be carried out binary conversion treatment respectively;Display module shows message interface in the target area for obtaining target area according to the average gray value of each local picture.The invention also discloses a kind of message display methods.The present invention realizes user without exiting current display interface, can carry out the access and processing of short message, chat messages etc., easy to operate, the user experience is improved.

Description

Message display device and method
Technical field
The present invention relates to field of communication technology more particularly to a kind of message display device and methods.
Background technique
With the development of mobile terminal technology, internet is popularized, and the mobile terminals such as mobile phone have become people's daily life With the necessity in work.The social activity and amusement function of mobile phone are higher two critical functions of frequency of use.And works as and use hand When the full frame viewing video of machine, if receiving the chat messages of short message or application software, user can not learn that is be currently received disappears Cease content.Only after exiting video mode, open short message or application software, user can just see current short message content or Person's chat messages content.If user needs to continue to watch video, need to be again turned on Video Applications.
Viewing is interrupted when user watches video and jumps the display interface of mobile terminal repeatedly, destroys the coherent of video Property, affect the video viewing experience of user.
Summary of the invention
The main purpose of the present invention is to provide a kind of message display device and methods, it is intended to solve to carry out when viewing video Social activity chat need to switch application software, cumbersome technical problem repeatedly.
To achieve the above object, the present invention provides a kind of message display device, and the message display device includes:
Module is obtained, when for receiving message, the screenshot of mobile terminal display interface is obtained, dividing the screenshot and obtain respectively Local picture;
Processing module obtains each local picture for each local picture to be carried out binary conversion treatment respectively Average gray value;
Display module, it is aobvious in the target area for obtaining target area according to the average gray value of each local picture Show message interface.
In one embodiment, the processing module includes:
Simplified element for reducing each local picture respectively to preset size, and simplifies color, obtains corresponding Each miniature grayscale image;
Binarization unit obtains corresponding each miniature for each miniature grayscale image to be carried out binary conversion treatment respectively Binary picture;
Equal value cell, for obtaining the average gray value of each miniature binary picture respectively, as corresponding described each The average gray value of local picture.
In one embodiment, the binarization unit includes:
Threshold value subelement, for the gray value according to each pixel in each miniature grayscale image, acquisition makes described each respectively Difference is minimum in the pixel class of miniature grayscale image or the maximum gray value of class inherited, for the corresponding ash of each miniature grayscale image Spend threshold value;
First processing subelement, for according to each gray threshold, respectively by corresponding each miniature grayscale image into Row binary conversion treatment obtains corresponding each miniature binary picture.
In one embodiment, the binarization unit includes:
Mean value subelement, for obtaining the average gray value of each miniature grayscale image respectively;
Second processing subelement respectively will be corresponding described for the average gray value according to each miniature grayscale image Each miniature grayscale image carries out binary conversion treatment, obtains corresponding each miniature binary picture.
In one embodiment, the message display device further include:
Timing module, if message is received again by for the mobile terminal described in preset time interval, in the mesh Mark region shows the message interface;
The acquisition module obtains if being also used to the mobile terminal after preset time interval is received again by message The screenshot for taking the mobile terminal display interface divides the screenshot and obtains each local picture.
In addition, to achieve the above object, the present invention also provides a kind of message display method, the message display method includes Following steps:
When receiving message, the screenshot of mobile terminal display interface is obtained, divides the screenshot and obtains each local picture;
Each local picture is subjected to binary conversion treatment respectively, obtains the average gray value of each local picture;
Target area is obtained according to the average gray value of each local picture, shows message interface in the target area.
In one embodiment, described that each local picture is subjected to binary conversion treatment respectively, obtain each part The step of average gray value of picture includes:
Each local picture is reduced respectively to preset size, and simplifies color, obtains corresponding each miniature grayscale image;
Each miniature grayscale image is subjected to binary conversion treatment respectively, obtains corresponding each miniature binary picture;
The average gray value for obtaining each miniature binary picture respectively, as being averaged for corresponding each local picture Gray value.
In one embodiment, described that each miniature grayscale image is subjected to binary conversion treatment respectively, it obtains corresponding each The step of miniature binary picture includes:
According to the gray value of each pixel in each miniature grayscale image, the pixel for making each miniature grayscale image is obtained respectively Difference is minimum in class or the maximum gray value of class inherited, for the corresponding gray threshold of each miniature grayscale image;
According to each gray threshold, corresponding each miniature grayscale image is subjected to binary conversion treatment respectively, is obtained pair Each miniature binary picture answered.
In one embodiment, described that each miniature grayscale image is subjected to binary conversion treatment respectively, it obtains corresponding each The step of miniature binary picture includes:
The average gray value of each miniature grayscale image is obtained respectively;
According to the average gray value of each miniature grayscale image, corresponding each miniature grayscale image is subjected to two-value respectively Change processing, obtains corresponding each miniature binary picture.
In one embodiment, the average gray value according to each local picture obtains target area, in the target Region was shown after the step of message interface, further includes:
If the mobile terminal is received again by message in preset time interval, shown in the target area described in Message interface;If the mobile terminal is received again by message after preset time interval, it is transferred to execution step: obtaining movement The screenshot of terminal display interface divides the screenshot and obtains each local picture.
A kind of message display device proposed by the present invention and method when receiving message, obtain current show by obtaining module Show that the screenshot at interface, segmentation screenshot obtain each local picture;Then, processing module respectively carries out each local picture at binaryzation Reason obtains the average gray value of each local picture;Then, display module obtains target according to the average gray value of each local picture Region shows message interface in target area.The present invention is when receiving the chat messages of short message or application software, at analysis The current display interface of mobile terminal is managed, the target area for being suitble to display message is chosen, shows message interface, consults and disappears for user It ceases or carries out the processing such as replying, so that short message, chat messages etc. can be realized without exiting current display interface in user It consults and handles, easy to operate, the user experience is improved.The present invention carries out social chat when solving viewing video need to be anti- Switch application software again, cumbersome technical problem realizes user and does not switch application software, can consult chat messages or Person performs corresponding processing.
Detailed description of the invention
The hardware structural diagram of Fig. 1 each embodiment one optional mobile terminal to realize the present invention;
Fig. 2 is the wireless communication system schematic diagram of mobile terminal as shown in Figure 1;
Fig. 3 is the functional block diagram of message display device first embodiment of the present invention;
Fig. 4 is the functional block diagram of message display device second embodiment of the present invention;
Fig. 5 is the functional block diagram of message display device 3rd embodiment of the present invention;
Fig. 6 is the functional block diagram of message display device fourth embodiment of the present invention;
Fig. 7 is the functional block diagram of the 5th embodiment of message display device of the present invention;
Fig. 8 is the flow diagram of message display method first embodiment of the present invention;
Fig. 9 is the flow diagram of message display method second embodiment of the present invention;
Figure 10 is the flow diagram of message display method 3rd embodiment of the present invention;
Figure 11 is the flow diagram of message display method fourth embodiment of the present invention;
Figure 12 is the flow diagram of the 5th embodiment of message display method of the present invention;
Figure 13 shows message interface application scenarios schematic diagram when being a kind of viewing video in the embodiment of the present invention.
The object of the invention is realized, the embodiments will be further described with reference to the accompanying drawings for functional characteristics and advantage.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The mobile terminal of each embodiment of the present invention is realized in description with reference to the drawings.In subsequent description, use For indicate element such as " module ", " component " or " unit " suffix only for being conducive to explanation of the invention, itself There is no specific meanings.Therefore, " module " can be used mixedly with " component ".
Mobile terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as moving Phone, smart phone, laptop, digit broadcasting receiver, PDA (personal digital assistant), PAD (tablet computer), PMP The mobile terminal of (portable media player), navigation device etc. and such as number TV, desktop computer etc. are consolidated Determine terminal.Hereinafter it is assumed that terminal is mobile terminal.However, it will be understood by those skilled in the art that in addition to being used in particular for moving Except purpose element, the construction of embodiment according to the present invention can also apply to the terminal of fixed type.
The optional mobile terminal hardware configuration signal of one of Fig. 1 each embodiment to realize the present invention.
Mobile terminal 100 may include wireless communication unit 110, user input unit 120, sensing unit 130, output list Member 140, memory 150, controller 160 and power supply unit 170 etc..Fig. 1 shows the mobile terminal with various assemblies, but It is that should be understood that, it is not required that implement all components shown.More or fewer components can alternatively be implemented.It will be under The element of face detailed description mobile terminal.
Wireless communication unit 110 generally includes one or more components, allows mobile terminal 100 and wireless communication system Or the radio communication between network.For example, wireless communication unit may include mobile communication module 111 and wireless Internet mould At least one of block 112.
Mobile communication module 111 sends radio signals to base station (for example, access point, node B etc.), exterior terminal And at least one of server and/or receive from it radio signal.Such radio signal may include that voice is logical Talk about signal, video calling signal or according to text and/or Multimedia Message transmission and/or received various types of data.
The Wi-Fi (Wireless Internet Access) of the support mobile terminal of wireless Internet module 112.The module can be internally or externally It is couple to terminal.Wi-Fi (Wireless Internet Access) technology involved in the module may include WLAN (Wireless LAN) (Wi-Fi), Wibro (WiMAX), Wimax (worldwide interoperability for microwave accesses), HSDPA (high-speed downlink packet access) etc..
The order that user input unit 120 can be inputted according to user generates key input data to control movement
The various operations of terminal.User input unit 120 allows user to input various types of information, and may include Keyboard, metal dome, touch tablet (for example, detection due to caused by being contacted the variation of resistance, pressure, capacitor etc. it is touch-sensitive Component), idler wheel, rocking bar etc..Particularly, when touch tablet is superimposed upon in the form of layer on display unit 141, touching can be formed Touch screen.
Sensing unit 130 detects the current state of mobile terminal 100, (for example, mobile terminal 100 opens or closes shape State), the position of mobile terminal 100, user is for the presence or absence of contact (that is, touch input) of mobile terminal 100, mobile terminal 100 orientation, the acceleration or deceleration movement of mobile terminal 100 and direction etc., and generate for controlling mobile terminal 100 The order of operation or signal.
Output unit 140 may include display unit 141, audio output module 142 etc..
Display unit 141 may be displayed on the information handled in mobile terminal 100.For example, when mobile terminal 100 is in electricity When talking about call mode, display unit 141 can show and converse or other communicate (for example, text messaging, multimedia file Downloading etc.) relevant user interface (UI) or graphic user interface (GUI).When mobile terminal 100 is in video calling mode Or when image capture mode, display unit 141 can show captured image and/or received image, show video or figure Picture and the UI or GUI of correlation function etc..
Meanwhile when display unit 141 and touch tablet in the form of layer it is superposed on one another to form touch screen when, display unit 141 may be used as input unit and output device.Display unit 141 may include liquid crystal display (LCD), thin film transistor (TFT) In LCD (TFT-LCD), Organic Light Emitting Diode (OLED) display, flexible display, three-dimensional (3D) display etc. at least It is a kind of.Some in these displays may be constructed such that transparence to allow user to watch from outside, this is properly termed as transparent Display, typical transparent display can be, for example, TOLED (transparent organic light emitting diode) display etc..According to specific Desired embodiment, mobile terminal 100 may include two or more display units (or other display devices), for example, moving Dynamic terminal may include outernal display unit (not shown) and inner display unit (not shown).Touch screen can be used for detecting touch Input pressure and touch input position and touch input area.
Audio output module 142 can mobile terminal be in call signal reception pattern, call mode, logging mode, It is when under the isotypes such as speech recognition mode, broadcast reception mode, wireless communication unit 110 is received or in memory 150 The audio data transducing audio signal of middle storage and to export be sound.Moreover, audio output module 142 can provide and movement The relevant audio output of specific function (for example, call signal receives sound, message sink sound etc.) that terminal 100 executes. Audio output module 142 may include loudspeaker, buzzer etc..
Memory 150 can store the software program etc. of the processing and control operation that are executed by controller 160, Huo Zheke Temporarily to store oneself data (for example, telephone directory, message, still image, video etc.) through exporting or will export.
Memory 150 may include the storage medium of at least one type, and the storage medium includes flash memory, hard disk, more Media card, card-type memory (for example, SD or DX memory etc.), random access storage device (RAM), static random-access storage Device (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read only memory (PROM), magnetic storage, disk, CD etc..Moreover, mobile terminal 100 can execute memory with by network connection The network storage device of 150 store function cooperates.
The overall operation of the usually control mobile terminal of controller 160.For example, controller 160 executes and voice communication, data Communication, video calling etc. relevant control and processing.Controller 160 can be with execution pattern identifying processing, will be in touch screen The handwriting input of upper execution or picture draw input and are identified as character or image.
Power supply unit 170 receives external power or internal power under the control of controller 160 and provides operation each member Electric power appropriate needed for part and component.
Various embodiments described herein can be to use the calculating of such as computer software, hardware or any combination thereof Machine readable medium is implemented.Hardware is implemented, embodiment described herein can be by using application-specific IC (ASIC), digital signal processor (DSP), digital signal processing device (DSPD), programmable logic device (PLD), scene can Programming gate array (FPGA), controller, microcontroller, microprocessor, is designed to execute function described herein processor At least one of electronic unit is implemented, and in some cases, such embodiment can be implemented in controller 160. For software implementation, the embodiment of such as process or function can with allow to execute the individual of at least one functions or operations Software module is implemented.Software code can by the software application (or program) write with any programming language appropriate Lai Implement, software code can store in memory 150 and be executed by controller 160.
So far, oneself is through describing mobile terminal according to its function.In the following, for the sake of brevity, will description such as folded form, Slide type mobile terminal in various types of mobile terminals of board-type, oscillating-type, slide type mobile terminal etc., which is used as, to be shown Example.Therefore, the present invention can be applied to any kind of mobile terminal, and be not limited to slide type mobile terminal.
Mobile terminal 100 as shown in Figure 1 may be constructed such that using via frame or grouping send data it is all if any Line and wireless communication system and satellite-based communication system operate.
Referring now to Fig. 2 description communication system that wherein mobile terminal according to the present invention can operate.
Different air interface and/or physical layer can be used in such communication system.For example, used by communication system Air interface includes such as frequency division multiple access (FDMA), time division multiple acess (TDMA), CDMA (CDMA) and universal mobile communications system System (UMTS) (particularly, long term evolution (LTE)), global system for mobile communications (GSM) etc..As non-limiting example, under The description in face is related to cdma communication system, but such introduction is equally applicable to other types of system.
With reference to Fig. 2, cdma wireless communication system may include multiple mobile terminals 100, multiple base stations (BS) 270, base station Controller (BSC) 275 and mobile switching centre (MSC) 280.MSC280 is configured to and Public Switched Telephony Network (PSTN) 290 form interface.MSC280 is also structured to form interface with the BSC275 that can be couple to base station 270 via back haul link. Back haul link can be constructed according to any in several known interfaces, and the interface includes such as E1/T1, ATM, IP, PPP, frame relay, HDSL, ADSL or xDSL.It will be appreciated that system may include multiple BSC275 as shown in Figure 2.
Each BS270 can service one or more subregions (or region), by multidirectional antenna or the day of direction specific direction Each subregion of line covering is radially far from BS270.Alternatively, each subregion can be by two or more for diversity reception Antenna covering.Each BS270, which may be constructed such that, supports multiple frequency distribution, and the distribution of each frequency has specific frequency spectrum (for example, 1.25MHz, 5MHz etc.).
What subregion and frequency were distributed, which intersects, can be referred to as CDMA Channel.BS270 can also be referred to as base station transceiver System (BTS) or other equivalent terms.In this case, term " base station " can be used for broadly indicating single BSC275 and at least one BS270.Base station can also be referred to as " cellular station ".Alternatively, each subregion of specific BS270 can be claimed For multiple cellular stations.
As shown in Figure 2, broadcast singal is sent to the mobile terminal operated in system by broadcsting transmitter (BT) 295 100.In fig. 2 it is shown that several global positioning system (GPS) satellites 300.The help of satellite 300 positions multiple mobile terminals 100 At least one of.
In Fig. 2, multiple satellites 300 are depicted, are obtained it should be understood that can use any number of satellite Useful location information.It substitutes GPS tracking technique or except GPS tracking technique, can be used can track mobile terminal Position other technologies.In addition, at least one 300 property of can choose of GPS satellite or extraly processing satellite dmb pass It is defeated.
As a typical operation of wireless communication system, BS270 receives the reverse link from various mobile terminals 100 Signal.Mobile terminal 100 usually participates in call, information receiving and transmitting and other types of communication.Certain base station 270 is received each anti- It is handled in specific BS270 to link signal.The data of acquisition are forwarded to relevant BSC275.BSC provides call The mobile management function of resource allocation and the coordination including the soft switching process between BS270.The number that BSC275 will also be received According to MSC280 is routed to, the additional route service for forming interface with PSTN290 is provided.Similarly, PSTN290 with MSC280 forms interface, and MSC and BSC275 form interface, and BSC275 controls BS270 correspondingly with by forward link signals It is sent to mobile terminal 100.
Based on above-mentioned mobile terminal hardware configuration and communication system, each embodiment of the present invention is proposed.
Referring to Fig. 3, message display device first embodiment of the present invention provides a kind of message display device, and the message is shown Device includes:
Module 10 is obtained, when for receiving message, the screenshot of mobile terminal display interface is obtained, dividing the screenshot and obtain Each part picture.
The embodiment of the present invention makes full use of the white space of video clip, short message, the wechat, QQ that display mobile terminal receives Equal chat messages, are fast chatted, improve the service efficiency of mobile phone, increase user experience.
Certainly, it is can also be applied to interface, other application software interface etc., can flexibly set according to actual needs It sets.Message display device is deployed in mobile terminal.
Specifically, as an implementation, when user is using mobile terminal viewing video or plays game, obtaining mould Block 10 monitors the short message of mobile terminal and the chat messages state of application software.
If mobile terminal receives message, such as the chat messages of short message or application software, then module 10 is obtained to current Display interface carry out screenshot, obtain the screenshot of current mobile terminal display interface.
Then, it obtains module 10 and divides current screenshot, obtain each local picture.
Equal-sized multiple pros can be divided into for screenshot according to the resolution ratio of current mobile terminal by obtaining module 10 Shape part picture.For example, the display interface of current mobile terminal is the ratio of width to height of 16:9, then screenshot can be split to obtain 16 × 9 equal-sized local pictures of square.It is, of course, also possible to smaller, the obtained size phase that division size is arranged Deng square picture it is also just also more, image procossing is finer.
After obtaining each local picture, obtains module 10 and record position of the current each local picture in screen.
Processing module 20 obtains each local picture for each local picture to be carried out binary conversion treatment respectively Average gray value.
After obtaining each local picture, each local picture is carried out binaryzation by processing module 20, obtains each local picture Average gray value.
Specifically, as an implementation, each local picture is carried out binary conversion treatment by processing module 20, each office is obtained The corresponding binary picture of portion's picture namely the corresponding artwork master of each local picture.
It takes in binary picture, the gray value of black pixel point is 1, and the gray value of white pixel point is 0.
Then, processing module 20 is according in the corresponding binary picture of each local picture, the ash of the number of pixel and each pixel Angle value calculates separately to obtain the average gray value of each binary picture, namely has obtained the average gray of corresponding each local picture Value.
Display module 30, for obtaining target area according to the average gray value of each local picture, in the target area Show message interface.
After the average gray value for obtaining each local picture, display module 30 is obtained according to the draw gray value of each local picture Target area is taken, and shows message interface in target area, short message, chat messages of application software etc. is consulted for user, carries out Quickly revert.
Specifically, as an implementation, firstly, average gray of the display module 30 according to obtained each local picture It is poor to obtain the adjacent local picture average gray value in position for value.Display module 30 is preset with the difference threshold of adjacent local picture, If the average gray value difference of adjacent part picture is less than preset difference threshold, determine that this adjacent local picture is similar Background merges this adjacent local picture and obtains merging figure.
For example, taking the average gray value of local picture A is A1, the average gray value of local picture B is B1, local picture A It is the adjacent local picture in two positions with local picture B.
Then the average gray value difference of part picture A and local picture B are Δ AB=| A1-B1 |.
Taking preset difference threshold is Δ 0, if Δ 0 > Δ AB, determines that local picture A and part picture B is similar office Portion's picture merges part picture A and local picture B, obtains merging figure.
After display module 30 traverses all local pictures, one or more merging figures are obtained.
Then, display module 30 obtains the position of merging figure, and available each conjunction according to the position of each local picture And size, the shape of figure.
Display module 30 chooses target area according to factors such as the position of obtained merging figure, size, shapes.For example, aobvious Show that module 30 can preferentially select the merging figure of mobile terminal marginal position as target area, reduces the shadow to video pictures It rings;Display module 30 can preferentially select the merging figure of square or rectangular as target area, promote the aobvious of message interface Show effect;Display module 30 can also preferentially choose the maximum merging figure of size as target area, increase the aobvious of message interface Show effect, realizes that display module 30 according to Multiple factors, flexibly chooses target area.
Obtained target area is background area similar in color in display interface, is suitble to display message interface.
Behind the target area chosen, display module 30 shows message interface in target area, consults and disappears for user Breath, is handled.
Referring to Fig.1 3, it is illustrated with active user using the full frame viewing video of mobile terminal.
When mobile terminal receives short message, the screenshot that module 10 obtains current display interface is obtained, segmentation screenshot obtains each office Portion's picture;Then, each local picture is carried out binary conversion treatment respectively by processing module 20, obtains the average gray of each local picture Value;Then, display module 30 obtains target area according to the average gray value of each local picture, shows message circle in target area Face.
It include the short message received in message interface, user can consult short message without exiting currently watched video.To subtract Few influence to the currently viewing video of user, it is transparent background that message interface, which can be set, only shows that message text, picture etc. disappear Cease content.
Alternatively, display module 30 can also show the short message received and relevant function button in message interface, such as return Multiple button can be in the reply of current display interface progress message after user clicks reply button.User's completion replies message It after editor, clicks and sends, display module 30 calls short message service by the system service interface of short message, sends short message, and hide Current message interface realizes the quickly revert of short message.It is, of course, also possible to carry out the processing such as deletion of short message.
As another embodiment, display module 30 is preset with pure color threshold value, for judging whether local picture is pure Chromatic graph piece.The setting of pure color threshold value can be adjusted as needed, such as 0.2.
Display module 30 judges whether the average gray value of each local picture is less than preset pure color threshold value respectively.If part The average gray value of picture is less than preset pure color threshold value, then determines that this local picture is pure color picture, display module 30 traverses Each part picture obtains determining result.
Then, display module 30 merges adjacent pure color picture, obtains one or more merging figures.
Then, display module 30 is schemed according to each merging, chooses target area, shows message interface in target area.It chooses Obtained target area is solid color regions, so that user is more easier to see the message interface of display, it is good to carry out Message Processing.
If obtaining module 10 within the preset time and not receiving user to the operational order at current message interface, then show Module 30 hides current message interface.
In the present embodiment, when receiving message, the screenshot that module 10 obtains current display interface is obtained, segmentation screenshot obtains Each part picture;Then, each local picture is carried out binary conversion treatment respectively by processing module 20, obtains being averaged for each local picture Gray value;Then, display module 30 obtains target area according to the average gray value of each local picture, shows and disappears in target area Cease interface.The present embodiment passes through the current aobvious of analysis processing mobile terminal when receiving the chat messages of short message or application software Show interface, choose the target area for being suitble to display message, show message interface, consult message for user or reply etc. Reason, so that the access and processing of short message, chat messages etc., operation side can be realized without exiting current display interface in user Just quick, the user experience is improved.The embodiment of the present invention carries out social chat when solving viewing video need to switch application repeatedly Software, cumbersome technical problem realize user and do not switch application software, can consult chat messages or carry out corresponding Processing.
Further, referring to Fig. 4, message display device of the present invention provides a kind of message display device, is based on above-mentioned Fig. 3 institute The embodiment shown, the processing module 20 include:
Simplified element 21 for reducing each local picture respectively to preset size, and simplifies color, is corresponded to Each miniature grayscale image.
After obtaining each local picture, each local picture is carried out diminution processing according to preset size by simplified element 21, Obtain corresponding each miniature local picture.
Preset size can flexible setting according to actual needs, such as can be 8 × 8, share the pros of 64 pixels Shape.
After obtaining each miniature local picture, each miniature local picture is carried out color and simplifies processing by simplified element 21, is obtained To the grayscale image namely the corresponding each miniature grayscale image of each miniature part picture of each miniature local picture.
The tonal gradation of each miniature grayscale image is identical, can be flexible setting as needed, such as by each miniature Local map Piece is converted to 64 grades of grayscale image, then obtains each miniature grayscale image all pixels and share 64 kinds of colors.
Binarization unit 22 obtains corresponding each micro- for each miniature grayscale image to be carried out binary conversion treatment respectively Contracting binary picture.
After obtaining each miniature grayscale image, binarization unit 22 obtains the gray value of each pixel in miniature grayscale image as just Beginning gray value.
Binarization unit 22 is preset with gray threshold, the binary conversion treatment for each miniature grayscale image.
Binarization unit 22 is greater than or equal to gray scale according to default gray threshold, by initial gray value in each miniature grayscale image The pixel grey scale processing of threshold value is black, is white by the grey scale pixel value processing that initial gray value is less than gray threshold.As a result, Obtain the binaryzation picture of each miniature grayscale image.
Binarization unit 22 carries out binary conversion treatment to each miniature grayscale image respectively, obtains corresponding each miniature binaryzation Figure, obtained each miniature binary picture are artwork master, only black and white colors.
Equal value cell 23, for obtaining the average gray value of each miniature binary picture respectively, as corresponding described The average gray value of each part picture.
After obtaining each miniature binary picture, equal value cell 23 obtains the gray value that each pixel is current in figure.For example, taking The gray value of black picture element is 1 in each miniature binary picture, and white grey scale pixel value is 0.
Then, equal value cell 23 is obtained according to the total number of the current sum of the grayscale values pixel of pixel each in miniature binary picture Take the average gray value of miniature binary picture.Equal value cell 23 calculates separately to obtain the average gray value of each miniature binary picture.
Then, equal value cell 23 is using the average gray value of obtained each miniature binary picture as corresponding each local picture Average gray value.
Equal value cell 23 obtains the average gray value of each local picture as a result,.
In the present embodiment, after obtaining each local picture, simplified element 21 reduces each local picture to preset ruler respectively It is very little, and simplify color, obtain corresponding each miniature grayscale image;Each miniature grayscale image is carried out binaryzation respectively by binarization unit 22 Processing, obtains corresponding each miniature binary picture;Equal value cell 23 obtains the average gray value of each miniature binary picture respectively, makees For the average gray value of corresponding each local picture.The present embodiment carries out binary conversion treatment acquisition by reducing each local picture Average gray value reduces the data volume of image procossing, improves image processing speed.
Further, referring to Fig. 5, message display device 3rd embodiment of the present invention provides a kind of message display device, base In above-mentioned embodiment shown in Fig. 4, the binarization unit 22 includes:
Threshold value subelement 221, for the gray value according to each pixel in each miniature grayscale image, acquisition makes each micro- respectively Difference is minimum in the pixel class of contracting grayscale image or the maximum gray value of class inherited, for the corresponding gray scale of each miniature grayscale image Threshold value.
After obtaining each miniature grayscale image, threshold value subelement 221 obtains the current grayvalue of each pixel in miniature grayscale image Initial gray value as each pixel.
Then, it is maximum to obtain difference minimum or class inherited in the pixel class for making each miniature grayscale image for threshold value subelement 221 Gray value be the corresponding gray threshold of each miniature grayscale image.
Specifically, as an implementation, it is m that threshold value subelement 221, which takes the tonal gradation of current miniature grayscale image, then Each pixel initial gray value range of current miniature grayscale image is (0, m-1).
The gray threshold for taking current miniature grayscale image is k, 0≤k≤m-1.
It takes current miniature grayscale image to share n pixel, n pixel is divided into two classes, gray value is less than the pixel of k, with ash Angle value is greater than or equal to the pixel of k.Wherein, pixel of the gray value less than k shares n1, and gray value is greater than or equal to the pixel of k Shared n2, n1+n2=n.
W1 indicates that pixel of the current grayvalue less than k accounts for the specific gravity of sum of all pixels in current miniature grayscale image, W1=n1/n; W2 indicates that current grayvalue is greater than or the pixel of grade k accounts for the specific gravity of sum of all pixels in current miniature grayscale image, W2=n2/n.
Threshold value subelement 221 calculates separately to obtain pixel grey scale average value mu 1 and variances sigma 1 that current grayvalue is less than k, when Preceding gray value is greater than or the pixel grey scale average value mu 2 and variances sigma 2 of grade k.
Difference X1 in class is calculated according to the following formula:
X1=W1 × σ 12+W2×σ22
Class inherited X2 is calculated according to the following formula:
X2=W1 × W2 × (μ 1- μ 2)2
Threshold value subelement 221 traverses whole gray values within the scope of 0 to m-1, obtains keeping X1 maximum or the smallest k value of X2, This k value is to make in current miniature grayscale image pixel class difference minimum or the maximum gray value of class inherited, using this k value as working as The corresponding gray threshold of preceding miniature grayscale image.
Threshold value subelement 221 calculates separately to obtain the corresponding gray threshold of each miniature grayscale image according to above-mentioned formula.
First processing subelement 222, is used for according to each gray threshold, respectively by corresponding each miniature grayscale image Binary conversion treatment is carried out, corresponding each miniature binary picture is obtained.
After obtaining each gray threshold, the first processing subelement 222, will be in corresponding miniature grayscale image according to gray threshold The processes pixel that initial gray value is greater than or equal to gray threshold is black, initial gray value is less than at the pixel of gray threshold Reason is white.
The first processing subelement 222 obtains the binaryzation picture of miniature grayscale image as a result,.
First processing subelement 222 carries out binary conversion treatment according to the corresponding each gray threshold of each miniature grayscale image respectively, Corresponding each miniature binary picture is obtained, obtained each miniature binary picture is artwork master, only black and white colors.
In the present embodiment, after obtaining each miniature grayscale image, threshold value subelement 221 is according to each pixel in each miniature grayscale image Gray value, obtain makes in the pixel class of each miniature grayscale image difference minimum or the maximum gray value of class inherited respectively, as The corresponding gray threshold of each miniature grayscale image;First processing subelement 222, respectively will be corresponding each miniature according to each gray threshold Grayscale image carries out binary conversion treatment, obtains corresponding each miniature binary picture.The present embodiment by the pixel in miniature grayscale image into Row classification, makes in image pixel class difference minimum or the maximum gray value of class inherited is as gray threshold, interior difference minimum or When class inherited, difference is maximum between the pixel class of present image, and misclassification probability is small, obtained binary image accuracy rate It is high.
Further, referring to Fig. 6, message display device fourth embodiment of the present invention provides a kind of message display device, base The embodiment shown in above-mentioned 4, the binarization unit 22 include:
Mean value subelement 223, for obtaining the average gray value of each miniature grayscale image respectively.
After obtaining each miniature grayscale image, mean value subelement 223 obtains the current grayvalue of each pixel in miniature grayscale image Initial gray value as each pixel.
Then, mean value subelement 223 divides according to the initial gray value of sum of all pixels and each pixel in each miniature grayscale image The average gray value of each miniature grayscale image is not calculated.
Second processing subelement 224, for the average gray value according to each miniature grayscale image, respectively by corresponding institute It states each miniature grayscale image and carries out binary conversion treatment, obtain corresponding each miniature binary picture.
After the average gray value for obtaining each miniature grayscale image, second processing subelement 224, will be right according to average gray value It is black that initial gray value, which is greater than or equal to the processes pixel of average gray value, in the miniature grayscale image answered, and initial gray value is small In average gray value processes pixel be white.
Second processing subelement 224 obtains the binaryzation picture of miniature grayscale image as a result,.
Second processing subelement 224 respectively carries out at binaryzation corresponding each miniature grayscale image according to each average gray value Reason, obtains corresponding each miniature binary picture, and obtained each miniature binary picture is artwork master, only black and white colors.
In the present embodiment, after obtaining each miniature grayscale image, mean value subelement 223 obtains the flat of each miniature grayscale image respectively Equal gray value;Then, second processing subelement 224, respectively will be corresponding each micro- according to the average gray value of each miniature grayscale image Contracting grayscale image carries out binary conversion treatment, obtains corresponding each miniature binary picture.The present embodiment passes through according to each miniature grayscale image Average gray value, binary conversion treatment is carried out to each miniature grayscale image, data processing amount is small, improves data processing speed.
Further, referring to Fig. 7, the 5th embodiment of message display device of the present invention provides a kind of message display device, base In above-mentioned Fig. 3, Fig. 4, Fig. 5 or embodiment shown in fig. 6 (the present embodiment is by taking Fig. 3 as an example), the message display device further include:
Timing module 40, if message is received again by for the mobile terminal described in preset time interval, described Target area shows the message interface;
The acquisition module 10, if being also used to the mobile terminal after preset time interval is received again by message, The screenshot for obtaining the mobile terminal display interface divides the screenshot and obtains each local picture.
In the present embodiment, timing module 40 is preset with time interval, needs to choose target area again for assessing whether. Taking preset time interval is T.
After receiving message for the first time, timing module 40 starts to carry out timing, if mobile terminal is again in T time or T time The secondary chat messages for receiving short message or application software, then display module 30 shows message interface in the target area, for user Message is consulted, or carries out the processing of message.It should be noted that when receiving message, if timing module 40 is not being counted at that time When, then timing module 40 determines currently to be to receive message for the first time.
If in T time, timing module 40 does not receive new information, then mobile terminal stops timing.
If mobile terminal is received again by short message or application software after T time namely after timing module 40 stops timing Chat messages, then timing module 40 is judged to receiving message for the first time, restarts timing, obtains module 10 and intercepts current display circle The picture in face is handled, and display module 30 chooses target area and shows message interface.
In the present embodiment, if mobile terminal is received again by message in preset time interval, timing module 40 is controlled System shows message interface in target area;If mobile terminal is received again by message after preset time interval, module is obtained 10 obtain the screenshot of mobile terminal current display interface, and display module 30 chooses target area again.The present embodiment is preset The display position for not changing message interface in time interval, alleviates data processing load.Meanwhile after preset time interval If mobile terminal is received again by message, target area is chosen again and shows message interface, avoids mobile terminal display interface Dynamic change leads to former target area unsuitable display message interface.The present embodiment realizes choice of dynamical target area, Suitable position is provided for the display of message interface, is consulted convenient for user, processing message, the user experience is improved.
Referring to Fig. 8, message display method first embodiment of the present invention provides a kind of message display method, and the message is shown Method includes:
Step S10, when receiving message, the screenshot of mobile terminal display interface is obtained, divides the screenshot and obtains each part Picture.
The embodiment of the present invention makes full use of the white space of video clip, short message, the wechat, QQ that display mobile terminal receives Equal chat messages, are fast chatted, improve the service efficiency of mobile phone, increase user experience.
Certainly, it is can also be applied to interface, other application software interface etc., can flexibly set according to actual needs It sets.
Specifically, as an implementation, it is mobile whole when user is using mobile terminal viewing video or plays game The chat messages state of end monitoring short message and application software.
If mobile terminal receives message, such as the chat messages of short message or application software, then mobile terminal is to current Display interface carries out screenshot, obtains the screenshot of current mobile terminal display interface.
Then, mobile terminal divides current screenshot, obtains each local picture.
Screenshot can be divided into equal-sized multiple squares according to the resolution ratio of current mobile terminal by mobile terminal Local picture.For example, the display interface of current mobile terminal is the ratio of width to height of 16:9, then screenshot can be split to obtain 16 × 9 equal-sized local pictures of square.It is, of course, also possible to which what is obtained is equal in magnitude by the smaller of division size setting Square picture it is also just also more, image procossing is finer.
After obtaining each local picture, position of the current each local picture of mobile terminal records in screen.
Step S20, each local picture is subjected to binary conversion treatment respectively, obtains the average ash of each local picture Angle value.
After obtaining each local picture, each local picture is carried out binaryzation by mobile terminal, obtains the flat of each local picture Equal gray value.
Specifically, as an implementation, each local picture is carried out binary conversion treatment by mobile terminal, each part is obtained The corresponding binary picture of picture namely the corresponding artwork master of each local picture.
It takes in binary picture, the gray value of black pixel point is 1, and the gray value of white pixel point is 0.
Then, mobile terminal is according in the corresponding binary picture of each local picture, the gray scale of the number of pixel and each pixel Value, calculates separately to obtain the average gray value of each binary picture, namely has obtained the average gray value of corresponding each local picture.
Step S30, target area is obtained according to the average gray value of each local picture, shows message in the target area Interface.
After the average gray value for obtaining each local picture, mobile terminal is obtained according to the draw gray value of each local picture Target area, and message interface is shown in target area, short message, chat messages of application software etc. are consulted for user, are carried out fast Victory is replied.
Specifically, as an implementation, firstly, average gray of the mobile terminal according to obtained each local picture It is poor to obtain the adjacent local picture average gray value in position for value.Mobile terminal is preset with the difference threshold of adjacent local picture, if The average gray value difference of adjacent part picture is less than preset difference threshold, then determines that this adjacent local picture is similar back Jing Tu merges this adjacent local picture and obtains merging figure.
For example, taking the average gray value of local picture A is A1, the average gray value of local picture B is B1, local picture A It is the adjacent local picture in two positions with local picture B.
Then the average gray value difference of part picture A and local picture B are Δ AB=| A1-B1 |.
Taking preset difference threshold is Δ 0, if Δ 0 > Δ AB, determines that local picture A and part picture B is similar office Portion's picture merges part picture A and local picture B, obtains merging figure.
After mobile terminal traverses all local pictures, one or more merging figures are obtained.
Then, mobile terminal obtains the position of merging figure, and available each merging according to the position of each local picture Size, the shape of figure.
Mobile terminal chooses target area according to factors such as position, size, the shapes for merging figure.For example, mobile terminal can Preferentially to select the merging figure of mobile terminal marginal position as target area, the influence to video pictures is reduced;Mobile terminal It can preferentially select the merging figure of square or rectangular as target area, promote the display effect of message interface;It is mobile whole End can also preferentially choose the maximum merging figure of size as target area, increase the display effect of message interface, realize movement Terminal flexibly chooses target area according to Multiple factors.
Obtained target area is background area similar in color in display interface, is suitble to display message interface.
Behind the target area chosen, mobile terminal shows message interface in target area, consults message for user, It is handled.
Referring to Fig.1 3, it is illustrated with active user using the full frame viewing video of mobile terminal.
When mobile terminal receives short message, the screenshot of current display interface is obtained, segmentation screenshot obtains each local picture;So Afterwards, each local picture is subjected to binary conversion treatment respectively, obtains the average gray value of each local picture;Then according to each Local map The average gray value of piece obtains target area, shows message interface in target area.
It include the short message received in message interface, user can consult short message without exiting currently watched video.To subtract Few influence to the currently viewing video of user, it is transparent background that message interface, which can be set, only shows that message text, picture etc. disappear Cease content.
Alternatively, mobile terminal can also show the short message received and relevant function button in message interface, such as reply Button after user clicks reply button, can carry out the reply of message at current video interface.User completes the volume replied message It after volume, clicks and sends, mobile terminal calls short message service by the system service interface of short message, sends short message, and hide current Message interface, realize the quickly revert of short message.It is, of course, also possible to carry out the processing such as deletion of short message.
As another embodiment, mobile terminal is preset with pure color threshold value, for judging whether local picture is pure color Picture.The setting of pure color threshold value can be adjusted as needed, such as 0.2.
Judge whether the average gray value of each local picture is less than preset pure color threshold value respectively.If local picture is averaged Gray value is less than preset pure color threshold value, then determines that this local picture is pure color picture, each local picture of mobile terminal traversal obtains To judgement result.
Then, mobile terminal merges adjacent pure color picture, obtains one or more merging figures.
Then, mobile terminal is schemed according to each merging, chooses target area, shows message interface in target area.It chooses The target area arrived is solid color regions, so that user is more easier to see the message interface of display, it is good to carry out Message Processing.
If not receiving user to the operational order at current message interface, then mobile terminal is hidden and worked as within the preset time Preceding message interface.
In the present embodiment, when receiving message, the screenshot of mobile terminal display interface is obtained, segmentation screenshot obtains each part Picture;Then each local picture is subjected to binary conversion treatment respectively, obtains the average gray value of each local picture;Then according to each The average gray value of local picture obtains target area, shows message interface in target area.The present embodiment receive short message or When the chat messages of application software, by the current display interface of analysis processing mobile terminal, the mesh for being suitble to display message is chosen Region is marked, shows message interface, consult message for user or carries out the processing such as replying, so that user is not necessarily to exit current show Show interface, the access and processing of short message, chat messages etc. can be realized, easy to operate, the user experience is improved.The present invention Embodiment carries out social chat when solving viewing video need to switch application software repeatedly, and cumbersome technical problem is realized User does not switch application software, can consult chat messages or performs corresponding processing.
Further, referring to Fig. 9, message display method second embodiment of the present invention provides a kind of message display method, base In the embodiment that above-mentioned Fig. 8 shows, the step S20 includes:
Step S21, each local picture is reduced respectively to preset size, and simplifies color, is obtained corresponding each micro- Contracting grayscale image.
After obtaining each local picture, each local picture is carried out diminution processing according to preset size by mobile terminal, is obtained To corresponding each miniature local picture.
Preset size can flexible setting according to actual needs, such as can be 8 × 8, share the pros of 64 pixels Shape.
After obtaining each miniature local picture, each miniature local picture is subjected to color and simplifies processing, obtains each miniature office The grayscale image of portion's picture namely the corresponding each miniature grayscale image of each miniature part picture.
The tonal gradation of each miniature grayscale image is identical, can be flexible setting as needed, such as by each miniature Local map Piece is converted to 64 grades of grayscale image, then obtains each miniature grayscale image all pixels and share 64 kinds of colors.
Step S22, each miniature grayscale image is subjected to binary conversion treatment respectively, obtains corresponding each miniature binaryzation Figure.
After obtaining each miniature grayscale image, the gray value of each pixel is as initial ash in the miniature grayscale image of acquisition for mobile terminal Angle value.
Mobile terminal is preset with gray threshold, the binary conversion treatment for each miniature grayscale image.
Mobile terminal is greater than or equal to gray threshold according to default gray threshold, by initial gray value in each miniature grayscale image Pixel grey scale processing be black, by initial gray value be less than gray threshold grey scale pixel value processing for white.It obtains as a result, The binaryzation picture of each miniature grayscale image.
Mobile terminal carries out binary conversion treatment to each miniature grayscale image respectively, obtains corresponding each miniature binary picture, obtains Each miniature binary picture arrived is artwork master, only black and white colors.
Step S23, the average gray value for obtaining each miniature binary picture respectively, as corresponding each Local map The average gray value of piece.
After obtaining each miniature binary picture, the gray value that each pixel is current in figure is obtained.For example, taking each miniature two-value The gray value for changing black picture element in figure is 1, and white grey scale pixel value is 0.
Then, mobile terminal is obtained according to the total number of the current sum of the grayscale values pixel of pixel each in miniature binary picture The average gray value of miniature binary picture.Mobile terminal calculates separately to obtain the average gray value of each miniature binary picture.
Then, mobile terminal is using the average gray value of obtained each miniature binary picture as corresponding each local picture Average gray value.
The average gray value of each local picture is obtained as a result,.
In the present embodiment, after obtaining each local picture, each local picture is reduced respectively to preset size, and simplify color Coloured silk obtains corresponding each miniature grayscale image;Each miniature grayscale image is subjected to binary conversion treatment respectively, obtains corresponding each miniature two Value figure;The average gray value for obtaining each miniature binary picture respectively, the average gray value as corresponding each local picture.This Embodiment obtains average gray value, reduces the data volume of image procossing by reducing each local picture, progress binary conversion treatment, Improve image processing speed.
Further, referring to Fig.1 0, message display method 3rd embodiment of the present invention provides a kind of message display method, base In above-mentioned embodiment shown in Fig. 9, the step S22 includes:
Step S221, according to the gray value of each pixel in each miniature grayscale image, obtain makes each miniature ash respectively Spend that difference in the pixel class of figure is minimum or the maximum gray value of class inherited, for the corresponding gray scale threshold of each miniature grayscale image Value.
After obtaining each miniature grayscale image, the current grayvalue of each pixel is as each in the miniature grayscale image of acquisition for mobile terminal The initial gray value of pixel.
Then, acquisition for mobile terminal makes difference minimum or the maximum gray scale of class inherited in the pixel class of each miniature grayscale image Value is the corresponding gray threshold of each miniature grayscale image.
Specifically, as an implementation, taking the tonal gradation of current miniature grayscale image is m, then current miniature gray scale Each pixel initial gray value range of figure is (0, m-1).
The gray threshold for taking current miniature grayscale image is k, 0≤k≤m-1.
It takes current miniature grayscale image to share n pixel, n pixel is divided into two classes, gray value is less than the pixel of k, with ash Angle value is greater than or equal to the pixel of k.Wherein, pixel of the gray value less than k shares n1, and gray value is greater than or equal to the pixel of k Shared n2, n1+n2=n.
W1 indicates that pixel of the current grayvalue less than k accounts for the specific gravity of sum of all pixels in current miniature grayscale image, W1=n1/n; W2 indicates that current grayvalue is greater than or the pixel of grade k accounts for the specific gravity of sum of all pixels in current miniature grayscale image, W2=n2/n.
It calculates separately to obtain pixel grey scale average value mu 1 and variances sigma 1 that current grayvalue is less than k, current grayvalue is greater than Or the pixel grey scale average value mu 2 and variances sigma 2 of grade k.
Difference X1 in class is calculated according to the following formula:
X1=W1 × σ 12+W2×σ22
Class inherited X2 is calculated according to the following formula:
X2=W1 × W2 × (μ 1- μ 2)2
Mobile terminal traverses whole gray values within the scope of 0 to m-1, obtains keeping X1 maximum or the smallest k value of X2, this k value As make difference minimum or the maximum gray value of class inherited in current miniature grayscale image pixel class, using this k value as current micro- The corresponding gray threshold of contracting grayscale image.
Mobile terminal calculates separately to obtain the corresponding gray threshold of each miniature grayscale image according to above-mentioned formula.
Step S222, according to each gray threshold, corresponding each miniature grayscale image is carried out at binaryzation respectively Reason, obtains corresponding each miniature binary picture.
After obtaining each gray threshold, mobile terminal is according to gray threshold, by initial gray in corresponding miniature grayscale image The processes pixel that value is greater than or equal to gray threshold is black, is white by the processes pixel that initial gray value is less than gray threshold Color.
The binaryzation picture of miniature grayscale image is obtained as a result,.
Mobile terminal carries out binary conversion treatment according to the corresponding each gray threshold of each miniature grayscale image respectively, obtains corresponding Each miniature binary picture, obtained each miniature binary picture are artwork master, only black and white colors.
In the present embodiment, after obtaining each miniature grayscale image, according to the gray value of each pixel in each miniature grayscale image, respectively Difference minimum or the maximum gray value of class inherited in the pixel class for making each miniature grayscale image are obtained, as each miniature grayscale image pair The gray threshold answered;According to each gray threshold, corresponding each miniature grayscale image is subjected to binary conversion treatment respectively, is obtained corresponding Each miniature binary picture.The present embodiment classifies the pixel in miniature grayscale image, make in image pixel class difference minimum or The maximum gray value of class inherited is as gray threshold, when interior difference is minimum or class inherited, the pixel class of present image it Between difference it is maximum, misclassification probability is small, and obtained binary image accuracy rate is high.
Further, referring to Fig.1 1, message display method fourth embodiment of the present invention provides a kind of display methods, based on upper Embodiment shown in Fig. 9 is stated, the step S22 includes:
Step S223, the average gray value of each miniature grayscale image is obtained respectively.
After obtaining each miniature grayscale image, the current grayvalue of each pixel is as each in the miniature grayscale image of acquisition for mobile terminal The initial gray value of pixel.
Then, mobile terminal is counted respectively according to the initial gray value of sum of all pixels and each pixel in each miniature grayscale image Calculation obtains the average gray value of each miniature grayscale image.
Step S224, according to the average gray value of each miniature grayscale image, respectively by corresponding each miniature gray scale Figure carries out binary conversion treatment, obtains corresponding each miniature binary picture.
After the average gray value for obtaining each miniature grayscale image, mobile terminal, will be corresponding miniature according to average gray value It is black that initial gray value, which is greater than or equal to the processes pixel of average gray value, in grayscale image, and initial gray value is less than average ash The processes pixel of angle value is white.
The binaryzation picture of miniature grayscale image is obtained as a result,.
Mobile terminal carries out binary conversion treatment to corresponding each miniature grayscale image according to each average gray value respectively, obtains pair Each miniature binary picture answered, obtained each miniature binary picture are artwork master, only black and white colors.
In the present embodiment, after obtaining each miniature grayscale image, the average gray value of each miniature grayscale image is obtained respectively;Then According to the average gray value of each miniature grayscale image, corresponding each miniature grayscale image is subjected to binary conversion treatment respectively, is corresponded to Each miniature binary picture.The present embodiment carries out each miniature grayscale image by the average gray value according to each miniature grayscale image Binary conversion treatment, data processing amount is small, improves data processing speed.
Further, referring to Fig.1 2, the 5th embodiment of message display method of the present invention provides a kind of message display method, base The embodiment shown in above-mentioned Fig. 8, Fig. 9, Figure 10 or Figure 11 (the present embodiment is by taking Fig. 8 as an example) after the step S30, is also wrapped It includes:
If step S40, the mobile terminal is received again by message in preset time interval, in the target area Show the message interface;If the mobile terminal is received again by message after preset time interval, it is transferred to execution step S10。
In the present embodiment, mobile terminal is preset with time interval, needs to choose target area again for assessing whether.It takes Preset time interval is T.
After receiving message for the first time, mobile terminal starts to carry out timing, if mobile terminal is again in T time or T time The chat messages for receiving short message or application software, then show message interface in the target area, consults message for user, or Carry out the processing of message.It should be noted that, if mobile terminal is not at that time in timing, judgement is currently when receiving message Message is received for the first time.
If in T time, mobile terminal does not receive new information, then mobile terminal stops timing.
If mobile terminal is received again by chatting for short message or application software after T time namely after mobile terminal stops timing Its message, then mobile terminal is judged to receiving message for the first time, restarts timing, intercepts at the picture of current display interface Reason chooses target area and shows message interface.
In the present embodiment, aobvious in target area if mobile terminal is received again by message in preset time interval Show message interface;If mobile terminal is received again by message after preset time interval, obtains mobile terminal and currently show boundary The screenshot in face, chooses target area again.The present embodiment does not change the display position of message interface in preset time interval, Alleviate the data processing load of mobile terminal.Meanwhile if mobile terminal is received again by message after preset time interval, Again it chooses target area and shows message interface, avoid the dynamic change of mobile terminal display interface, led to former target area Be not suitable for display message interface.The present embodiment realizes choice of dynamical target area, provides properly for the display of message interface Position, convenient for user consult, processing message, the user experience is improved.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal device (can be mobile phone, computer, clothes Business device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
The above is only alternative embodiments of the invention, are not intended to limit the scope of the invention, all to utilize this hair Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills Art field, is included within the scope of the present invention.

Claims (6)

1. a kind of message display device, which is characterized in that the message display device includes:
Module is obtained, when for receiving message, the screenshot of mobile terminal display interface is obtained, dividing the screenshot and obtain each part Picture;
Processing module obtains being averaged for each local picture for each local picture to be carried out binary conversion treatment respectively Gray value;
Display module shows in the target area and disappears for obtaining target area according to the average gray value of each local picture Cease interface;
Wherein, the processing module includes:
Simplified element for reducing each local picture respectively to preset size, and simplifies color, obtains corresponding each micro- Contracting grayscale image;
Binarization unit obtains corresponding each miniature two-value for each miniature grayscale image to be carried out binary conversion treatment respectively Change figure;
Equal value cell, for obtaining the average gray value of each miniature binary picture respectively, as corresponding each part The average gray value of picture;
Wherein, the binarization unit includes:
Mean value subelement, for obtaining the average gray value of each miniature grayscale image respectively;
Second processing subelement respectively will be corresponding described each micro- for the average gray value according to each miniature grayscale image Contracting grayscale image carries out binary conversion treatment, obtains corresponding each miniature binary picture.
2. message display device as described in claim 1, which is characterized in that the binarization unit includes:
Threshold value subelement, for the gray value according to each pixel in each miniature grayscale image, acquisition makes described each miniature respectively Difference is minimum in the pixel class of grayscale image or the maximum gray value of class inherited, for the corresponding gray scale threshold of each miniature grayscale image Value;
First processing subelement, for corresponding each miniature grayscale image to be carried out two respectively according to each gray threshold Value processing, obtains corresponding each miniature binary picture.
3. such as the described in any item message display devices of claim 1-2, which is characterized in that the message display device also wraps It includes:
Timing module, if message is received again by for the mobile terminal described in preset time interval, in the target area Domain shows the message interface;
The acquisition module obtains institute if being also used to the mobile terminal after preset time interval is received again by message The screenshot for stating mobile terminal display interface divides the screenshot and obtains each local picture.
4. a kind of message display method, which is characterized in that the message display method the following steps are included:
When receiving message, the screenshot of mobile terminal display interface is obtained, divides the screenshot and obtains each local picture;
Each local picture is subjected to binary conversion treatment respectively, obtains the average gray value of each local picture;
Target area is obtained according to the average gray value of each local picture, shows message interface in the target area;
Wherein, described that each local picture is subjected to binary conversion treatment respectively, obtain the average gray of each local picture The step of value includes:
Each local picture is reduced respectively to preset size, and simplifies color, obtains corresponding each miniature grayscale image;
Each miniature grayscale image is subjected to binary conversion treatment respectively, obtains corresponding each miniature binary picture;
The average gray value for obtaining each miniature binary picture respectively, the average gray as corresponding each local picture Value;
Wherein, described that each miniature grayscale image is subjected to binary conversion treatment respectively, obtain corresponding each miniature binary picture Step includes:
The average gray value of each miniature grayscale image is obtained respectively;
According to the average gray value of each miniature grayscale image, corresponding each miniature grayscale image is carried out at binaryzation respectively Reason, obtains corresponding each miniature binary picture.
5. message display method as claimed in claim 4, which is characterized in that described respectively to carry out each miniature grayscale image Binary conversion treatment, the step of obtaining corresponding each miniature binary picture include:
According to the gray value of each pixel in each miniature grayscale image, obtain makes in the pixel class of each miniature grayscale image respectively Difference is minimum or the maximum gray value of class inherited, for the corresponding gray threshold of each miniature grayscale image;
According to each gray threshold, corresponding each miniature grayscale image is subjected to binary conversion treatment respectively, is obtained corresponding Each miniature binary picture.
6. such as the described in any item message display methods of claim 4-5, which is characterized in that described according to the flat of each local picture Equal gray value obtains target area, after the step of target area shows message interface, further includes:
If the mobile terminal is received again by message in preset time interval, the message is shown in the target area Interface;If the mobile terminal is received again by message after preset time interval, it is transferred to execution step: obtaining mobile terminal The screenshot of display interface divides the screenshot and obtains each local picture.
CN201610177912.5A 2016-03-25 2016-03-25 Message display device and method Active CN105867729B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610177912.5A CN105867729B (en) 2016-03-25 2016-03-25 Message display device and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610177912.5A CN105867729B (en) 2016-03-25 2016-03-25 Message display device and method

Publications (2)

Publication Number Publication Date
CN105867729A CN105867729A (en) 2016-08-17
CN105867729B true CN105867729B (en) 2019-05-10

Family

ID=56625865

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610177912.5A Active CN105867729B (en) 2016-03-25 2016-03-25 Message display device and method

Country Status (1)

Country Link
CN (1) CN105867729B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106502490A (en) * 2016-09-19 2017-03-15 深圳市金立通信设备有限公司 A kind of incoming call reminding method and terminal
CN106547439B (en) * 2016-10-28 2020-01-07 努比亚技术有限公司 Method and device for processing message
CN106775333A (en) * 2017-02-16 2017-05-31 深圳市茁壮网络股份有限公司 A kind of screenshotss method and device
CN107391069A (en) * 2017-07-27 2017-11-24 深圳市泰衡诺科技有限公司 A kind of method for information display and information display system based on intelligent terminal
CN107613115A (en) * 2017-09-06 2018-01-19 广东欧珀移动通信有限公司 Event-prompting method, device, mobile terminal and readable storage medium storing program for executing
CN108769362B (en) * 2018-04-12 2021-04-13 Oppo广东移动通信有限公司 Unread message prompting method of application program and related product
CN109144353A (en) * 2018-07-18 2019-01-04 奇酷互联网络科技(深圳)有限公司 The method, apparatus that mobile terminal and information are shown
CN109656437B (en) * 2018-11-30 2021-01-26 维沃移动通信有限公司 Information display method and terminal equipment
CN110865753B (en) * 2019-11-07 2021-01-22 支付宝(杭州)信息技术有限公司 Application message notification method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277409A (en) * 2007-03-31 2008-10-01 索尼德国有限责任公司 Method and device for displaying a message on a screen of a television
CN102075337A (en) * 2009-11-20 2011-05-25 腾讯科技(深圳)有限公司 Instant communication message display method and related device
CN104200211A (en) * 2014-09-03 2014-12-10 腾讯科技(深圳)有限公司 Image binaryzation method and device
CN105187644A (en) * 2015-08-27 2015-12-23 广东欧珀移动通信有限公司 Playing operation method and terminal
CN105430471A (en) * 2015-11-26 2016-03-23 无锡天脉聚源传媒科技有限公司 Method and device for displaying live commenting in video

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150187339A1 (en) * 2013-12-29 2015-07-02 Motorola Mobility Llc Previewing Notification Content

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101277409A (en) * 2007-03-31 2008-10-01 索尼德国有限责任公司 Method and device for displaying a message on a screen of a television
CN102075337A (en) * 2009-11-20 2011-05-25 腾讯科技(深圳)有限公司 Instant communication message display method and related device
CN104200211A (en) * 2014-09-03 2014-12-10 腾讯科技(深圳)有限公司 Image binaryzation method and device
CN105187644A (en) * 2015-08-27 2015-12-23 广东欧珀移动通信有限公司 Playing operation method and terminal
CN105430471A (en) * 2015-11-26 2016-03-23 无锡天脉聚源传媒科技有限公司 Method and device for displaying live commenting in video

Also Published As

Publication number Publication date
CN105867729A (en) 2016-08-17

Similar Documents

Publication Publication Date Title
CN105867729B (en) Message display device and method
CN105677231B (en) Associated application split screen display available device, method and terminal
CN106302108B (en) Group's information management method and device
CN106780634B (en) Picture dominant tone extracting method and device
CN105657175B (en) Network acceleration device and method
CN105511856B (en) The device and method for checking message
CN106412255B (en) Terminal and display methods
CN104850443B (en) A kind of method and mobile terminal for closing error starting application program
CN106951291A (en) Application program accelerates to start method and device
CN106201474A (en) A kind of notification message display packing and terminal
CN105554710B (en) Message display method and device
CN104679890B (en) Picture method for pushing and device
US11284398B2 (en) Communication link configuration method and device
CN106528073A (en) Terminal and terminal application uninstalling method
CN106547439A (en) A kind of method and apparatus for processing message
CN105554382B (en) A kind of mobile terminal and its method for realizing control of taking pictures
CN105975052A (en) Screen switching method and device
CN106657670B (en) Mobile terminal and triggering application method based on mobile terminal
CN106412103A (en) Display device and method of push information
CN106713661B (en) A kind of mobile terminal and the method for showing text
CN105872179B (en) A kind of incoming display method and device and mobile terminal
CN106714259A (en) Serving cell switching method and mobile terminal
CN105302457B (en) Terminal control method and device
CN105611056B (en) A kind of information processing method and mobile terminal
CN105681554B (en) Floating electro-optical device and method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant