Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
An alternative mobile terminal for implementing various embodiments of the present invention will now be described with reference to the accompanying drawings. In the following description, suffixes such as "module", "component", or "unit" used to denote elements are used only for facilitating the explanation of the present invention, and have no specific meaning in themselves. Thus, "modules" and "components" may be used in a mixture.
The mobile terminal may be implemented in various forms. For example, the terminal described in the present invention may include a mobile terminal such as a mobile phone, a smart phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a navigation device, and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. In the following, it is assumed that the terminal is a mobile terminal. However, it will be understood by those skilled in the art that the configuration according to the embodiment of the present invention can be applied to a fixed type terminal in addition to elements particularly used for moving purposes.
Fig. 1 is a schematic hardware configuration of a mobile terminal implementing various embodiments of the present invention.
The mobile terminal 100 may include a wireless communication unit 110, an a/V (audio/video) input unit 120, a user input unit 130, a sensing unit 140, an output unit 150, a memory 160, an interface unit 170, a controller 180, and a power supply unit 190, etc. Fig. 1 illustrates a mobile terminal having various components, but it is to be understood that not all illustrated components are required to be implemented. More or fewer components may alternatively be implemented. Elements of the mobile terminal will be described in detail below.
The wireless communication unit 110 typically includes one or more components that allow radio communication between the mobile terminal 100 and a wireless communication system or network. For example, the wireless communication unit may include at least one of a broadcast receiving module 111, a mobile communication module 112, a wireless internet module 113, a short-range communication module 114, and a location information module 115.
The broadcast receiving module 111 receives a broadcast signal and/or broadcast associated information from an external broadcast management server via a broadcast channel. The broadcast channel may include a satellite channel and/or a terrestrial channel. The broadcast management server may be a server that generates and transmits a broadcast signal and/or broadcast associated information or a server that receives a previously generated broadcast signal and/or broadcast associated information and transmits it to a terminal. The broadcast signal may include a TV broadcast signal, a radio broadcast signal, a data broadcast signal, and the like. Also, the broadcast signal may further include a broadcast signal combined with a TV or radio broadcast signal. The broadcast associated information may also be provided via a mobile communication network, and in this case, the broadcast associated information may be received by the mobile communication module 112. The broadcast signal may exist in various forms, for example, it may exist in the form of an Electronic Program Guide (EPG) of Digital Multimedia Broadcasting (DMB), an Electronic Service Guide (ESG) of digital video broadcasting-handheld (DVB-H), and the like. The broadcast receiving module 111 may receive a signal broadcast by using various types of broadcasting systems. In particular, the broadcast receiving module 111 may receive a broadcast signal by using a signal such as multimedia broadcasting-terrestrial (DMB-T), digital multimedia broadcasting-satellite (DMB-S), digital video broadcasting-handheld (DVB-H), forward link media (MediaFLO)@) A digital broadcasting system of a terrestrial digital broadcasting integrated service (ISDB-T), etc. receives digital broadcasting. The broadcast receiving module 111 may be constructed to be suitable for various broadcasting systems that provide broadcast signals as well as the above-mentioned digital broadcasting systems. The broadcast signal and/or broadcast associated information received via the broadcast receiving module 111 may be stored in the memory 160 (or other type of storage medium).
The mobile communication module 112 transmits and/or receives radio signals to and/or from at least one of a base station (e.g., access point, node B, etc.), an external terminal, and a server. Such radio signals may include voice call signals, video call signals, or various types of data transmitted and/or received according to text and/or multimedia messages.
The wireless internet module 113 supports wireless internet access of the mobile terminal. The module may be internally or externally coupled to the terminal. The wireless internet access technology to which the module relates may include WLAN (wireless LAN) (Wi-Fi), Wibro (wireless broadband), Wimax (worldwide interoperability for microwave access), HSDPA (high speed downlink packet access), and the like.
The short-range communication module 114 is a module for supporting short-range communication. Some examples of short-range communication technologies include bluetoothTMRadio Frequency Identification (RFID), infrared data association (IrDA), Ultra Wideband (UWB), zigbeeTMAnd so on.
The location information module 115 is a module for checking or acquiring location information of the mobile terminal. A typical example of the location information module is a GPS (global positioning system). According to the current technology, the GPS module 115 calculates distance information and accurate time information from three or more satellites and applies triangulation to the calculated information, thereby accurately calculating three-dimensional current location information according to longitude, latitude, and altitude. Currently, a method for calculating position and time information uses three satellites and corrects an error of the calculated position and time information by using another satellite. In addition, the GPS module 115 can calculate speed information by continuously calculating current position information in real time.
The a/V input unit 120 is used to receive an audio or video signal. The a/V input unit 120 may include a camera 121 and a microphone 1220, and the camera 121 processes image data of still pictures or video obtained by an image capturing apparatus in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 151. The image frames processed by the camera 121 may be stored in the memory 160 (or other storage medium) or transmitted via the wireless communication unit 110, and two or more cameras 1210 may be provided according to the construction of the mobile terminal. The microphone 122 may receive sounds (audio data) via the microphone in a phone call mode, a recording mode, a voice recognition mode, or the like, and can process such sounds into audio data. The processed audio (voice) data may be converted into a format output transmittable to a mobile communication base station via the mobile communication module 112 in case of a phone call mode. The microphone 122 may implement various types of noise cancellation (or suppression) algorithms to cancel (or suppress) noise or interference generated in the course of receiving and transmitting audio signals.
The user input unit 130 may generate key input data according to a command input by a user to control various operations of the mobile terminal. The user input unit 130 allows a user to input various types of information, and may include a keyboard, dome sheet, touch pad (e.g., a touch-sensitive member that detects changes in resistance, pressure, capacitance, and the like due to being touched), scroll wheel, joystick, and the like. In particular, when the touch pad is superimposed on the display unit 151 in the form of a layer, a touch screen may be formed.
The sensing unit 140 detects a current state of the mobile terminal 100 (e.g., an open or closed state of the mobile terminal 100), a position of the mobile terminal 100, presence or absence of contact (i.e., touch input) by a user with the mobile terminal 100, an orientation of the mobile terminal 100, acceleration or deceleration movement and direction of the mobile terminal 100, and the like, and generates a command or signal for controlling an operation of the mobile terminal 100. For example, when the mobile terminal 100 is implemented as a slide-type mobile phone, the sensing unit 140 may sense whether the slide-type phone is opened or closed. In addition, the sensing unit 140 can detect whether the power supply unit 190 supplies power or whether the interface unit 170 is coupled with an external device. The sensing unit 140 may include a proximity sensor 1410 as will be described below in connection with a touch screen.
The interface unit 170 serves as an interface through which at least one external device is connected to the mobile terminal 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The identification module may store various information for authenticating a user using the mobile terminal 100 and may include a User Identity Module (UIM), a Subscriber Identity Module (SIM), a Universal Subscriber Identity Module (USIM), and the like. In addition, a device having an identification module (hereinafter, referred to as "identification device") may take the form of a smart card, and thus, the identification device may be connected with the mobile terminal 100 via a port or other connection means. The interface unit 170 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 100 or may be used to transmit data between the mobile terminal and the external device.
In addition, when the mobile terminal 100 is connected with an external cradle, the interface unit 170 may serve as a path through which power is supplied from the cradle to the mobile terminal 100 or may serve as a path through which various command signals input from the cradle are transmitted to the mobile terminal. Various command signals or power input from the cradle may be used as signals for recognizing whether the mobile terminal is accurately mounted on the cradle. The output unit 150 is configured to provide output signals (e.g., audio signals, video signals, alarm signals, vibration signals, etc.) in a visual, audio, and/or tactile manner. The output unit 150 may include a display unit 151, an audio output module 152, an alarm unit 153, and the like.
The display unit 151 may display information processed in the mobile terminal 100. For example, when the mobile terminal 100 is in a phone call mode, the display unit 151 may display a User Interface (UI) or a Graphical User Interface (GUI) related to a call or other communication (e.g., text messaging, multimedia file downloading, etc.). When the mobile terminal 100 is in a video call mode or an image capturing mode, the display unit 151 may display a captured image and/or a received image, a UI or GUI showing a video or an image and related functions, and the like.
Meanwhile, when the display unit 151 and the touch pad are overlapped with each other in the form of a layer to form a touch screen, the display unit 151 may serve as an input device and an output device. The display unit 151 may include at least one of a Liquid Crystal Display (LCD), a thin film transistor LCD (TFT-LCD), an Organic Light Emitting Diode (OLED) display, a flexible display, a three-dimensional (3D) display, and the like. Some of these displays may be configured to be transparent to allow a user to view from the outside, which may be referred to as transparent displays, and a typical transparent display may be, for example, a TOLED (transparent organic light emitting diode) display or the like. Depending on the particular desired implementation, the mobile terminal 100 may include two or more display units (or other display devices), for example, the mobile terminal may include an external display unit (not shown) and an internal display unit (not shown). The touch screen may be used to detect a touch input pressure as well as a touch input position and a touch input area.
The audio output module 152 may convert audio data received by the wireless communication unit 110 or stored in the memory 160 into an audio signal and output as sound when the mobile terminal is in a call signal reception mode, a call mode, a recording mode, a voice recognition mode, a broadcast reception mode, or the like. Also, the audio output module 152 may provide audio output related to a specific function performed by the mobile terminal 100 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output module 152 may include a speaker, a buzzer, and the like.
The alarm unit 153 may provide an output to notify the mobile terminal 100 of the occurrence of an event. Typical events may include call reception, message reception, key signal input, touch input, and the like. In addition to audio or video output, the alarm unit 153 may provide output in different ways to notify the occurrence of an event. For example, the alarm unit 153 may provide an output in the form of vibration, and when a call, a message, or some other incoming communication (communicating communication) is received, the alarm unit 153 may provide a tactile output (i.e., vibration) to inform the user thereof. By providing such a tactile output, the user can recognize the occurrence of various events even when the user's mobile phone is in the user's pocket. The alarm unit 153 may also provide an output notifying the occurrence of an event via the display unit 151 or the audio output module 152.
The memory 160 may store software programs and the like for processing and controlling operations performed by the controller 180, or may temporarily store data (e.g., a phonebook, messages, still images, videos, and the like) that has been or will be output. Also, the memory 160 may store data regarding various ways of vibration and audio signals output when a touch is applied to the touch screen.
The memory 160 may include at least one type of storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. Also, the mobile terminal 100 may cooperate with a network storage device that performs a storage function of the memory 160 through a network connection.
The controller 180 generally controls the overall operation of the mobile terminal. For example, the controller 180 performs control and processing related to voice calls, data communications, video calls, and the like. In addition, the controller 180 may include a multimedia module 1810 for reproducing (or playing back) multimedia data, and the multimedia module 1810 may be constructed within the controller 180 or may be constructed separately from the controller 180. The controller 180 may perform a pattern recognition process to recognize a handwriting input or a picture drawing input performed on the touch screen as a character or an image.
The power supply unit 190 receives external power or internal power and provides appropriate power required to operate various elements and components under the control of the controller 180.
The various embodiments described herein may be implemented in a computer-readable medium using, for example, computer software, hardware, or any combination thereof. For a hardware implementation, the embodiments described herein may be implemented using at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a processor, a controller, a microcontroller, a microprocessor, an electronic unit designed to perform the functions described herein, and in some cases, such embodiments may be implemented in the controller 180. For a software implementation, the implementation such as a process or a function may be implemented with a separate software module that allows performing at least one function or operation. The software codes may be implemented by software applications (or programs) written in any suitable programming language, which may be stored in the memory 160 and executed by the controller 180.
Up to this point, mobile terminals have been described in terms of their functionality. Hereinafter, a slide-type mobile terminal among various types of mobile terminals, such as a folder-type, bar-type, swing-type, slide-type mobile terminal, and the like, will be described as an example for the sake of brevity. Accordingly, the present invention can be applied to any type of mobile terminal, and is not limited to a slide type mobile terminal.
The mobile terminal 100 as shown in fig. 1 may be configured to operate with communication systems such as wired and wireless communication systems and satellite-based communication systems that transmit data via frames or packets.
A communication system in which a mobile terminal according to the present invention is operable will now be described with reference to fig. 2.
Such communication systems may use different air interfaces and/or physical layers. For example, the air interface used by the communication system includes, for example, Frequency Division Multiple Access (FDMA), Time Division Multiple Access (TDMA), Code Division Multiple Access (CDMA), and Universal Mobile Telecommunications System (UMTS) (in particular, Long Term Evolution (LTE)), global system for mobile communications (GSM), and the like. By way of non-limiting example, the following description relates to a CDMA communication system, but such teachings are equally applicable to other types of systems.
Referring to fig. 2, the CDMA wireless communication system may include a plurality of mobile terminals 100, a plurality of Base Stations (BSs) 270, Base Station Controllers (BSCs) 275, and a Mobile Switching Center (MSC) 280. The MSC280 is configured to interface with a Public Switched Telephone Network (PSTN) 290. The MSC280 is also configured to interface with a BSC275, which may be coupled to the base station 270 via a backhaul. The backhaul may be constructed according to any of several known interfaces including, for example, E1/T1, ATM, IP, PPP, frame Relay, HDSL, ADSL, or xDSL. It will be understood that a system as shown in fig. 2 may include multiple BSCs 2750.
Each BS270 may serve one or more sectors (or regions), each sector covered by a multi-directional antenna or an antenna pointing in a particular direction being radially distant from the BS 270. Alternatively, each partition may be covered by two or more antennas for diversity reception. Each BS270 may be configured to support multiple frequency allocations, with each frequency allocation having a particular frequency spectrum (e.g., 1.25MHz,5MHz, etc.).
The intersection of partitions with frequency allocations may be referred to as a CDMA channel. The BS270 may also be referred to as a Base Transceiver Subsystem (BTS) or other equivalent terminology. In such a case, the term "base station" may be used to generically refer to a single BSC275 and at least one BS 270. The base stations may also be referred to as "cell sites". Alternatively, each sector of a particular BS270 may be referred to as a plurality of cell sites.
As shown in fig. 2, a Broadcast Transmitter (BT)295 transmits a broadcast signal to the mobile terminal 100 operating within the system. A broadcast receiving module 111 as shown in fig. 1 is provided at the mobile terminal 100 to receive a broadcast signal transmitted by the BT 295. In fig. 2, several Global Positioning System (GPS) satellites 300 are shown. The satellite 300 assists in locating at least one of the plurality of mobile terminals 100.
In fig. 2, a plurality of satellites 300 are depicted, but it is understood that useful positioning information may be obtained with any number of satellites. The GPS module 115 as shown in fig. 1 is generally configured to cooperate with satellites 300 to obtain desired positioning information. Other techniques that can track the location of the mobile terminal may be used instead of or in addition to GPS tracking techniques. In addition, at least one GPS satellite 300 may selectively or additionally process satellite DMB transmission.
As a typical operation of the wireless communication system, the BS270 receives reverse link signals from various mobile terminals 100. The mobile terminal 100 is generally engaged in conversations, messaging, and other types of communications. Each reverse link signal received by a particular base station 270 is processed within the particular BS 270. The obtained data is forwarded to the associated BSC 275. The BSC provides call resource allocation and mobility management functions including coordination of soft handoff procedures between BSs 270. The BSCs 275 also route the received data to the MSC280, which provides additional routing services for interfacing with the PSTN 290. Similarly, the PSTN290 interfaces with the MSC280, the MSC interfaces with the BSCs 275, and the BSCs 275 accordingly control the BS270 to transmit forward link signals to the mobile terminal 100.
Based on the above optional mobile terminal hardware structure and communication system, various embodiments of the method of the present invention are proposed.
As shown in fig. 3, a first embodiment of the present invention proposes a terminal 1 including: a detection module 11, a determination module 12 and a display module 13.
The detection module 11 is configured to detect a selection operation on an arbitrary region in the picture editing mode.
A determining module 12, configured to determine a selection area of the selection operation on the picture.
And a display module 13, configured to display an edge portion of the selected area in a first color.
Wherein the contrast ratio of the first color to the second color is greater than or equal to a preset contrast threshold value; the second color is an original color of an edge portion of the selected area.
Optionally, the detecting module 11 detects a selection operation on an arbitrary region in the picture, including:
detecting the attribute of a currently used picture editing tool;
determining whether the picture editing tool has a selection function according to the attribute of the picture editing tool;
when the picture editing tool is determined to have the selection function and to be in the selection function state, the moving operation of the picture editing tool in any area on the picture is determined as the selection operation.
Optionally, the determining module 12 determines that selecting the selection area on the picture comprises:
determining a moving track generated when the picture editing tool moves on the picture, and taking an area surrounded by the moving track as a selection area; or,
determining a starting point coordinate and an end point coordinate when the picture editing tool moves on the picture, and taking a rectangular area formed by a first abscissa and a first ordinate which take the starting point coordinate as an origin point and a second abscissa and a second ordinate which take the end point coordinate as the origin point as a selection area.
Optionally, the displaying module 13 displays the edge portion of the selected area in the first color, including:
determining an edge portion of the selected area;
detecting a second color of the edge portion;
acquiring a first color according to the second color;
the second color is changed to the first color.
Optionally, the picture editing tool includes any one of: a lasso tool, a picture cropping tool, a picture selection tool, and a picture capture tool.
In addition, to achieve the above object, the present invention further provides a method for editing a picture, as shown in fig. 4, the method includes S101-S103:
s101, in the picture editing mode, the selection operation of any area in the picture is detected.
In the embodiment of the invention, in order to solve the existing problem that the edge prompt color of the selected area is usually very similar to the picture when the picture is selected, so that the boundaries of the selected area and other areas are not obvious, the scheme of the embodiment of the invention provides a novel picture editing scheme, the scheme can display the edge part of the selected area in high-contrast colors, so that a user can clearly define the selected area, convenience is provided for the picture editing work of the user, and the user experience is improved.
In the embodiment of the present invention, in the picture editing mode, it is first required to determine whether the current editing operation for the picture is a selection operation, and the following scheme may be specifically used.
Alternatively, as shown in fig. 5, detecting a selection operation of an arbitrary region in the picture includes S201 to S203:
s201, detecting the attribute of the currently used picture editing tool.
In the embodiment of the present invention, in order to detect whether the current operation is a selection operation, it may be determined whether a currently-used picture editing tool is an operation having a selection function. Specifically, it can be obtained by the attribute of the picture editing tool used. The attribute of the picture editing tool may include an effect and an implementation manner of the picture editing tool, and the attribute of the picture editing tool may be stored in the terminal in advance. The terminal may detect a preset keyword in the attributes of the pre-stored picture editing tool, where the preset keyword is related to "selection", for example, "picture selection", "selection function", and the like. In the embodiment of the present invention, the specific description manner of the keyword is not limited.
S202, determining whether the picture editing tool has a selection function according to the attribute of the picture editing tool.
In the embodiment of the present invention, the function and implementation manner of the current picture editing tool are detected through the above steps, and specifically, after the detection of the preset keyword is performed, it can be determined whether the current picture editing tool has a selection function. When the attribute of the picture editing tool comprises a preset keyword related to selection, the current picture editing tool has a selection function; and when the attribute of the picture editing tool does not comprise the preset keywords related to selection, indicating that the current picture editing tool does not have the selection function.
Optionally, the picture editing tool may include any one of: lasso tools, picture cropping tools, picture selection tools, picture capture tools, matting tools, and the like.
In the embodiment of the present invention, the picture editing tools with selection function include, but are not limited to, the above-mentioned several. In the above-mentioned usage of the picture editing tool, a function of selecting a picture appears, and it should be noted that the picture selection or the function of selecting a picture refers to selecting any area on any one picture, rather than selecting one picture from a plurality of pictures.
And S203, when the picture editing tool is determined to have the selection function and is in the state of the selection function, determining the moving operation of the picture editing tool in any area on the picture as the selection operation.
In the embodiment of the present invention, if it is determined through the above steps that the current picture editing tool has a selection function and is currently under the selection function (for example, it is detected that a sub-tool related to picture selection in the current picture editing tool is selected), a moving operation of the picture editing tool in an arbitrary area on the picture may be determined as the selection operation.
And S102, determining a selection area of the selection operation on the picture.
In the embodiment of the present invention, when it is detected through the above steps that the current picture editing tool has a selection function and it is determined that the current picture editing tool is currently performing a selection operation, a selection area determined by the selection operation on a picture may be further determined. The selection area, i.e. the area determined by the corresponding selection tool on the selected image.
Optionally, determining that the selection area of the selection operation on the picture includes any one of a first mode and a second mode:
the method comprises the steps of determining a moving track generated when a picture editing tool moves on a picture, and taking an area surrounded by the moving track as a selection area.
In the embodiment of the invention, when picture selection is carried out, a selected picture can be dragged by dragging a selection sub-tool in the picture editing tool to generate a closed dragging track, and an area determined by the closed dragging track can be used as an area selected by the selection sub-tool. The selection mode is mainly applied to fine selection of the picture area, and can be used for drawing along the edge of an image to be selected to form a selection track so as to realize selection of the image.
And determining a starting point coordinate and an end point coordinate when the picture editing tool moves on the picture, and taking a rectangular area formed by a first abscissa and a first ordinate with the starting point coordinate as an origin and a second abscissa and a second ordinate with the end point coordinate as the origin as a selection area.
In the embodiment of the invention, when picture selection is performed, the selection sub-tool can be directly dragged without detecting a specific dragging track, only the coordinates of a starting point and the coordinates of a terminal point of dragging are recorded, a first coordinate system with the coordinates of the starting point as an origin is respectively established, and the abscissa and the ordinate of the first coordinate system are determined, namely the coordinate system with the first abscissa and the first ordinate as coordinate axes; similarly, respectively establishing a second coordinate system with the origin coordinate as the origin, and determining the abscissa and the ordinate of the second coordinate system, i.e. the coordinate system with the second abscissa and the second ordinate as coordinate axes; on the selected picture, the first abscissa, the first ordinate, the second abscissa, and the second ordinate may enclose a rectangular region, which is the selected region on the selected picture. This selection method is mainly applied to roughly select a picture region, and it is sufficient to surround an image to be selected in the rectangular region having the abscissa and the ordinate.
S103, displaying the edge part of the selected area in a first color.
Wherein the contrast ratio of the first color to the second color is greater than or equal to a preset contrast threshold value; the second color is an original color of an edge portion of the selected area.
In the embodiment of the present invention, after the selected area on the selected picture is determined by the above scheme, the color of the edge portion of the selected area and the second color in the above scheme may be changed, specifically, the color with the contrast ratio with the second color being greater than or equal to the preset contrast threshold, that is, the first color, is changed, so that the user can specify the selected area, convenience is provided for the user to edit the picture, and the user experience is improved. The preset contrast threshold may be defined by itself according to different application scenarios, and is not limited to a specific value.
Alternatively, as shown in fig. 7, displaying the edge portion of the selected area in the first color includes S301 to S304:
s301, determining the edge part of the selected area.
In the embodiment of the present invention, before the color of the edge portion of the selected area is changed, the edge portion of the selected area must be determined. Here, based on the two selection manners of the selection area, the edge portions of the selection area may be determined in a corresponding manner. The specific method can be determined by the following scheme.
Optionally, determining the edge portion of the selected area includes:
the first method is to take the moving track generated when the picture editing tool moves on the picture as the edge part of the selected area.
In the embodiment of the present invention, since the dragging track of the selected sub-tool determines the selected area, the dragging track is the edge portion of the selected area.
And determining a starting point coordinate and an end point coordinate when the picture editing tool moves on the picture, and taking four sides of a rectangular area formed by a first abscissa and a first ordinate which take the starting point coordinate as an origin and a second abscissa and a second ordinate which take the end point coordinate as the origin as edge parts of the selected area.
In the embodiment of the present invention, since the rectangular area formed by the first abscissa, the first ordinate, the second abscissa, and the second ordinate defines the selected area, four sides of the rectangular area are edge portions of the selected area.
And S302, detecting a second color of the edge part.
In the embodiment of the present invention, after the edge portion of the selected area on the picture is determined by the above scheme, the color of the edge portion on the picture, that is, the second color in the scheme of the embodiment of the present invention, may be further determined, specifically, the color of the edge portion on the picture may be taken, and the pixel value of the currently taken color may be determined.
And S303, acquiring a first color according to the second color.
In the embodiment of the present invention, after the second pixel value of the second color is obtained through the above steps, the first color with the contrast ratio to the second color being greater than or equal to the preset contrast threshold may be determined according to the second pixel value.
In the embodiment of the invention, the brightness contrast adjustment of one image belongs to the gray scale linear transformation of the image, and the formula is as follows, y is [ x-127.5 (1-B) ] k +127.5 (1+ B); wherein x is the pixel value before adjustment, and y is the pixel value after adjustment. Wherein B takes the value of [ -1,1], regulate the luminance; k adjusts the contrast, arctan (k) takes the value [1,89], so k tan ((45+44 × c)/180 × pi); wherein c takes the value [ -1,1 ]. Typically we use this value to set the contrast. In particular, when B ═ 0: y ═ x-127.5 × k + 127.5; only the contrast is adjusted at this time. When c is 0, k is 1: y +255 x B; only the brightness is adjusted at this time.
In the embodiment of the present invention, the first pixel value may be calculated on the basis of determining the second pixel value by substituting a preset contrast threshold into the above formula and making B equal to 0.
And S304, replacing the second color with the first color.
In the embodiment of the invention, the corresponding first color can be determined according to the acquired first pixel value. The edge part of the selected area is displayed in the first color, as shown in fig. 6, because the first color has higher contrast than the surrounding colors, the user can visually and clearly see the selected area, convenience is provided for the user to edit the picture, and the user experience is improved.
While all of the basic features of the embodiments of the present invention have been described, it should be noted that the above description is only one or more specific embodiments of the present invention, and in other embodiments, other embodiments may be adopted, and any embodiment similar to or the same as the embodiments of the present invention, and any combination of the basic features of the embodiments of the present invention is within the scope of the embodiments of the present invention. In addition, any embodiment in the method embodiments of the present invention is applicable to the apparatus embodiments of the present invention, and is not described herein again.
The invention provides a terminal and a picture editing method, wherein the terminal comprises: the device comprises a detection module, a determination module and a display module. The detection module detects selection operation of any area in the picture editing mode. The determination module determines a selection region of the selection operation on the picture. The display module displays an edge portion of the selected area in a first color. Wherein the contrast ratio of the first color to the second color is greater than or equal to a preset contrast threshold value; the second color is an original color of an edge portion of the selected area. By the scheme of the embodiment of the invention, the user defines the selected area, convenience is provided for the picture editing work of the user, and the user experience is improved.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.