WO2021147976A1 - 图像处理方法、装置、电子设备及存储介质 - Google Patents

图像处理方法、装置、电子设备及存储介质 Download PDF

Info

Publication number
WO2021147976A1
WO2021147976A1 PCT/CN2021/073179 CN2021073179W WO2021147976A1 WO 2021147976 A1 WO2021147976 A1 WO 2021147976A1 CN 2021073179 W CN2021073179 W CN 2021073179W WO 2021147976 A1 WO2021147976 A1 WO 2021147976A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
color information
information
color
transition
Prior art date
Application number
PCT/CN2021/073179
Other languages
English (en)
French (fr)
Inventor
李银辉
杨林
Original Assignee
北京达佳互联信息技术有限公司
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 北京达佳互联信息技术有限公司 filed Critical 北京达佳互联信息技术有限公司
Publication of WO2021147976A1 publication Critical patent/WO2021147976A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/40Filling a planar surface by adding surface attributes, e.g. colour or texture
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/54Browsing; Visualisation therefor

Definitions

  • the present disclosure relates to the field of data processing technology, and in particular to an image processing method, device, electronic equipment, and storage medium.
  • the background color of the display area of the carousel image remains unchanged during the display process of the adjacent carousel images.
  • the color of the carousel itself may have a large contrast with the background color of the display area of the carousel, resulting in a more abrupt display effect of the carousel.
  • the present disclosure provides a background color display method, device, electronic device, and storage medium, so as to at least solve the problem that the background color of the display area of the carousel diagram remains unchanged in the related art, which causes the display effect of the carousel diagram to be relatively abrupt.
  • the technical solutions of the present disclosure are as follows:
  • an image processing method including: acquiring main color information of a first image and a second image, and movement information of the first image and the second image, respectively,
  • the first image and the second image are two adjacent images displayed by moving in a preset direction within a preset image area; determining the image area according to the main color information and the movement information Transition color information in the background area, where the transition color information represents the difference between the first image and the second image that changes with the movement of the first image and the second image in the image area Color information fused between; displaying the background color in the background area according to the main hue information and the transition color information.
  • the step of determining the transition color information in the background area of the image area according to the main color information and the movement information includes: setting the main color information of the first image at a preset time Internal adjustment is the main color information of the second image to obtain a plurality of intermediate color information; in the process of moving the first image and the second image, the second image is placed in the image area As the movement information, when the first image and the second image are moved within the image area in the direction for the time, the movement information is 100%; The intermediate color information corresponding to the movement information is used as the transition color information.
  • the X represents the main color information of the first image
  • the Y represents the main color information of the second image.
  • the step of displaying the background color in the background area according to the main color information and the transition color information includes: taking the proportion of the second image in the image area as the The movement information; when the movement information is 0%, the background color is set to the main color information of the first image; when the movement information is 100%, the background color is set to The main color information of the second image; when the movement information is greater than 0% and the movement information is less than 100%, the background color is set to be from the main color information of the first image Initially, after passing the transition color information, to a gradient color ending with the main color information of the second image, the position of the transition color information in the background area corresponds to the movement information.
  • the step of displaying the background color in the background area according to the main color information and the transition color information further includes: when the movement information is greater than 0% and the movement information is less than 100%
  • the transition color information is converted from the RGB value to the HSB value, and the brightness value in the HSB value is increased by a preset amount to obtain the optimized transition color information; the background color is set from the first image
  • the main hue information of the second image starts, passes through the optimized transition color information, and ends with the main hue information of the second image.
  • the position of the optimized transition color information in the background area is the same as that of the Corresponding to mobile information.
  • an image processing device including: an acquisition module configured to acquire main tone information of a first image and a second image, and the first image and the first image 2.
  • the movement information of the image, the first image and the second image are two adjacent images displayed by moving in a preset direction within a preset image area;
  • the determining module is configured to be based on the main color tone Information and the movement information determine the transition color information in the background area of the image area, and the transition color information represents the change as the first image and the second image move within the image area Color information fused between the first image and the second image;
  • a display module configured to display the background color in the background area according to the main color information and the transition color information.
  • the determining module includes: a color adjustment module configured to adjust the main color information of the first image to the main color information of the second image within a preset time to obtain a plurality of intermediate colors. Color information; an information determination module configured to use the proportion of the second image in the image area as the movement information in the process of moving the first image and the second image, wherein , When the first image and the second image are moved in the image area according to the direction for the time, the movement information is 100%; the color determination module is configured to change the movement information The corresponding intermediate color information is used as the transition color information.
  • the display module is configured to: use the proportion of the second image in the image area as the movement information; when the movement information is 0%, set the background color Set as the main color information of the first image; when the movement information is 100%, set the background color as the main color information of the second image; when the movement information is greater than 0 %, and the movement information is less than 100%, the background color is set to start from the main color information of the first image, pass through the transition color information, to the main color information of the second image
  • the gradient color at the end of the hue information, and the position of the transition color information in the background area corresponds to the movement information.
  • the display module is further configured to: when the movement information is greater than 0% and the movement information is less than 100%, convert the transition color information from an RGB value to an HSB value, and convert the transition color information to an HSB value.
  • the brightness value in the HSB value is increased by a preset amount to obtain optimized transition color information;
  • the background color is set to start from the main hue information of the first image, and go through the optimized transition color information to the The gradient color at which the main color information of the second image ends, and the position of the optimized transition color information in the background area corresponds to the movement information.
  • an electronic device including: a processor; a memory for storing executable instructions of the processor; wherein the processor is configured to execute the instructions to The image processing method as described in the first aspect is implemented.
  • a storage medium When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can perform image processing as described in the first aspect. method.
  • a computer program product including readable program code, which can be executed by a processor of an electronic device to complete the image processing method as described in the first aspect .
  • Fig. 1 is a flowchart showing the steps of an image processing method according to an exemplary embodiment.
  • Fig. 2 is a schematic diagram showing the operation of a method for displaying the background color of an advertising space carousel diagram according to an exemplary embodiment.
  • Fig. 3 is an effect diagram of a method for displaying the background color of an advertising space carousel diagram according to an exemplary embodiment.
  • Fig. 4 is a block diagram showing an image processing device according to an exemplary embodiment.
  • Fig. 5 is a block diagram showing an image processing electronic device according to an exemplary embodiment.
  • Fig. 6 is a block diagram showing an electronic device for processing an image according to an exemplary embodiment.
  • Fig. 1 is a flowchart showing the steps of an image processing method according to an exemplary embodiment.
  • the image processing method can be applied to image processing electronic equipment and used to display the background color of the carousel.
  • the electronic device may be a mobile phone, a computer, a digital broadcasting terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
  • Carousel images can be understood as images displayed in a preset image area in a loop at a preset speed and preset direction.
  • the background color can be understood as the background color in the background area of the image area when the carousel is displayed in the preset image area.
  • the background area can be set in the lower layer of the image area, and the area of the background area can be larger than the area of the image area, so that when the background color is displayed in the background area, the background color will not be completely blocked by the image area.
  • S11 Obtain the main color information of the first image and the second image, and the movement information of the first image and the second image, respectively.
  • the first image and the second image may be understood as any two adjacent images in the carousel image.
  • the main color information of the first image can be understood as the color information that accounts for the largest proportion of the color information of each pixel in the first image.
  • the main color information of the second image can be understood as the color information that accounts for the largest proportion of the color information of each pixel in the second image.
  • the color information with the largest proportion is one kind of color information
  • the main color information is the one with the largest proportion
  • the main color information with the largest proportion is multiple color information
  • the main color information can be the one with the largest proportion The average value of multiple color information.
  • the movement information of the first image and the second image can be understood as the position information of the movement of the first image and the second image within the preset image area.
  • the position information may indicate that the area occupied by the second image in the preset image area belongs to the preset image area. Set the percentage of the total area of the image area. For example, if the second image occupies 30% of the preset image area, the movement information of the first image and the second image is 30%.
  • S12 Determine the transition color information in the background area of the image area according to the main color information and the movement information.
  • the transition color information may be understood as the color information merged between the first image and the second image that changes as the first image and the second image move within a preset image area.
  • the transition color information may indicate the background color corresponding to the position where the first image and the second image are connected in the background area.
  • the movement information can gradually increase from 0 to 100% at most. As the movement information increases, the transition color information changes accordingly.
  • S13 Display the background color in the background area according to the main color information and the transition color information.
  • the main color information of the first image can be used as the leftmost background color of the background area
  • the main color information of the second image can be used as the rightmost background color of the background area.
  • the transition color information can be used as the background color corresponding to the location where the first image and the second image are connected in the background area.
  • the embodiment of the present disclosure obtains the main color information of the first image and the second image, and the movement information of the first image and the second image, respectively.
  • the first image and the second image are two adjacent images displayed by moving in a preset direction within a preset image area.
  • the transition color information can indicate that the transition color information changes with the movement of the first image and the second image in the image area.
  • the color information fused between the first image and the second image.
  • the background color in the background area is displayed according to the main color information and transition color information of the first image and the second image.
  • the transition color information in the embodiments of the present disclosure will change with the movement of the first image and the second image in the image area, and the background color displayed according to the main color information and the transition color information will also change with the first image and the second image.
  • the image is moved and changed, which prevents the background color from remaining unchanged, and reduces the abruptness of the moving display effect of the first image and the second image.
  • the main color information of the first image when the transition color information in the background area of the image area is determined according to the main color information and the movement information, the main color information of the first image may be adjusted to the first time within the first time.
  • the main color information of the image and obtain multiple intermediate color information.
  • the first time refers to the time preset by the user.
  • the process of adjusting the main color information of the first image to the main color information of the second image may be a process in which the main color information of the first image is gradually changed to the main color information of the second image, and the obtained multiple intermediate color information may be the first Multiple gradient colors from the main color information of the image to the main color information of the second image.
  • the proportion of the second image in the preset image area is used as the movement information.
  • the time when the main color information of the first image is adjusted to the main color information of the second image is the same as the time when the second image moves from one side of the preset image area to the other side, that is, the first image
  • the movement information may be 100%.
  • the intermediate color information corresponding to the movement information is used as the transition color information.
  • the main hue information of the first image is X
  • the main hue information of the second image is Y
  • the main hue information X is gradually changed to the main hue information Y within the preset time C to obtain a series of intermediate color information.
  • the series of intermediate color information indicates each color transitioning from the main hue information X to the main hue information Y.
  • Set a percentage Z to represent the intermediate color information. When Z is 0%, it means that the intermediate color information is X, and when Z is 100%, it means that the intermediate color information is Y.
  • Set another percentage P to represent the movement information of the first image and the second image. When P is 0%, it means that the second image has not moved to the preset image area, and the preset image area shows the entire first image.
  • the transition color information when determining the transition color information in the background area of the image area according to the main color information and the movement information, can also be determined according to the following formula:
  • Z1 represents the transition color information
  • P represents the movement information
  • the movement information is the proportion of the second image in the image area
  • X represents the main color information of the first image
  • Y represents the main color information of the second image.
  • the proportion of the second image in the image area is taken as the movement information, and when the movement information is At 0%, that is, when only the entire first image is displayed in the preset image area, set the background color as the main color information of the first image; when the movement information is 100%, that is, only the entire first image is displayed in the preset image area.
  • For the second image set the background color as the main color information of the second image; when the movement information is greater than 0% and the movement information is less than 100%, set the background color to start from the main color information of the first image and go through transition
  • the color information, the gradient color to the end of the main color information of the second image, and the position of the transition color information in the background area corresponds to the movement information.
  • the first image and the second image move in a direction from right to left within the preset image area, with the first image in the front and the second image in the back.
  • the movement information is 0%, that is, when only the entire first image is displayed in the preset image area, set the background color to the main color information X of the first image; when the movement information is 100%, it is the preset image
  • the background color is set as the main color information Y of the second image; when the movement information is greater than 0% and the movement information is less than 100%, the background color is set as the main color from the first image.
  • the hue information X starts, passes through the transition color information Z, and ends with the gradual color of the main hue information Y of the second image.
  • the transition color information Z generated by the main color information X of the first image and the main color information Y of the second image has a poor visual effect, so , The transition color information Z needs to be optimized.
  • the transition color information Z can be converted from the RGB value to the HSB value, and the brightness value in the converted HSB value can be increased by a preset amount to obtain the optimized transition color information Z' .
  • the RGB value represents the colors of the three channels of red, green, and blue
  • the HSB value represents the colors of the three dimensions of hue, saturation, and brightness.
  • the range of hue is 0-360
  • the range of saturation is 0-100
  • the range of brightness is 0-100.
  • the RGB value of the transition color information Z is R: 181, G: 232, B: 206
  • the converted HSB value is H: 150, S: 28, B: 75
  • the preset number can be set to 20, then Increase B in the HSB value by 20 to obtain the optimized transition color information Z'.
  • the HSB value is H: 150, S: 28, and B: 95.
  • the background color can be set to start from the main color information X of the first image and pass through the color information Z'after optimization.
  • the gradation color to the end of the main color information Y of the second image.
  • each carousel picture may be an advertisement picture
  • each advertisement picture corresponds to a theme color (that is, main color information)
  • the theme of each advertisement picture may be the color with the largest proportion among the advertisement pictures.
  • the color information of each pixel in the advertisement image can be obtained, and a set of multiple color information can be obtained.
  • the more pixels corresponding to the color information in the set the larger the proportion of the color information.
  • the color information with the largest proportion in the collection is used as the theme color of the advertisement image.
  • the size of the advertising space (ie, the image area) can be the same as the size of the advertising picture, which can be understood as the advertising space can display at most one complete advertising picture.
  • Fig. 2 is a schematic diagram showing the operation of a method for displaying the background color of an advertising space carousel diagram according to an exemplary embodiment.
  • the background color is set to the theme color X of the advertising image A.
  • the user manually slides the advertisement picture A from right to left, or the advertisement picture A automatically moves from right to left, and the advertisement picture B gradually enters the advertisement space.
  • the mobile information is 10%, 50%, and 80%.
  • the background color is no longer just the theme color X, but from left to right is the theme color X, the transition color Z, and the advertisement image B.
  • the gradient color of the theme color Y is the gradient color of the theme color Y.
  • the transition color Z can be understood as the background color corresponding to the junction of the advertisement picture A and the advertisement picture B.
  • the entire background color can be divided into a gradient color from the theme color X to the transition color Z, and a gradient color from the transition color Z to the theme color Y.
  • the transition color Z will change with the movement of the advertisement picture A and the advertisement picture B.
  • the user continues to manually slide the advertisement image A from right to left, or the advertisement image A continues to automatically move from right to left until the advertisement image A moves out of the advertising space, and the advertising space only displays the advertising image B.
  • the background color is set as the theme Color Y.
  • Fig. 3 is an effect diagram of a method for displaying the background color of an advertising space carousel diagram according to an exemplary embodiment.
  • the theme color of the advertisement picture A is red
  • the theme color of the advertisement picture B is blue.
  • the background color of the advertising space is displayed as follows: (1), completely red; (2), starting from red, passing through the transition color, and ending with blue; (3), It's completely blue.
  • the carousel that needs to be displayed in the ad slot has multiple ad pictures, for example, three or more.
  • the theme color corresponding to each advertisement picture can be determined in advance, and the transition color between two adjacent advertisement pictures can be determined.
  • the background color of the ad slot can be displayed according to the corresponding theme color, transition color, and so on.
  • a background color transition change rule is added to the advertising space, and the color of the advertising image in the advertising space can be integrated with the background color, and the display has transition
  • the background color of the effect reduces the abruptness of the advertisement picture, highlights the visibility of the advertisement picture, enhances the publicity effect of the advertisement picture, and renders the environmental atmosphere of the advertisement picture.
  • Fig. 4 is a block diagram showing an image processing device according to an exemplary embodiment.
  • the device may specifically include the following modules.
  • the obtaining module 41 is configured to obtain the main tone information of the first image and the second image, and the movement information of the first image and the second image, respectively, where the first image and the second image are in Move the two adjacent images displayed in the preset image area according to the preset direction;
  • the determining module 42 is configured to determine the transition color information in the background area of the image area according to the main color information and the movement information, where the transition color information indicates that as the first image and the second image are in Color information fused between the first image and the second image that change due to movement in the image area;
  • the display module 43 is configured to display the background color in the background area according to the main color information and the transition color information.
  • the determining module 42 includes:
  • the color adjustment module is configured to adjust the main color information of the first image to the main color information of the second image within a preset time to obtain a plurality of intermediate color information;
  • the information determining module is configured to use the proportion of the second image in the image area as the movement information in the process of moving the first image and the second image, wherein When the first image and the second image move within the image area in the direction for the time, the movement information is 100%;
  • the color determination module is configured to use the intermediate color information corresponding to the movement information as the transition color information.
  • the determining module 42 is configured to determine the transition color information according to the following formula:
  • the Z1 represents the transition color information
  • the P represents the movement information
  • the movement information is the proportion of the second image in the image area
  • the X represents the first The main color information of the image
  • the Y represents the main color information of the second image.
  • the display module 43 is configured to: use the proportion of the second image in the image area as the movement information; when the movement information is When 0%, the background color is set as the main color information of the first image; when the movement information is 100%, the background color is set as the main color information of the second image Information; when the movement information is greater than 0%, and the movement information is less than 100%, the background color is set to start from the main color information of the first image, go through the transition color information, to The gradient color at which the main color information of the second image ends, and the position of the transition color information in the background area corresponds to the movement information.
  • the display module 43 is further configured to: when the movement information is greater than 0% and the movement information is less than 100%, change the transition color information from RGB The value is converted into an HSB value, and the brightness value in the HSB value is increased by a preset amount to obtain optimized transition color information; the background color is set to start from the main color information of the first image and pass through all
  • the optimized transition color information is a gradient color to the end of the main tone information of the second image, and the position of the optimized transition color information in the background area corresponds to the movement information.
  • Fig. 5 is a block diagram showing an image processing electronic device 500 according to an exemplary embodiment.
  • the electronic device 500 may include one or more of the following components: a processing component 502, a memory 504, a power component 506, a multimedia component 508, an audio component 510, an input/output (I/O) interface 512, and a sensor component 514 , And communication component 516.
  • the processing component 502 generally controls the overall operations of the electronic device 500, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations.
  • the processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the foregoing method.
  • the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components.
  • the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.
  • the memory 504 is configured to store various types of data to support operations in the electronic device 500. Examples of these data include instructions for any application or method operating on the electronic device 500, contact data, phone book data, messages, pictures, videos, etc.
  • the memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable and Programmable Read Only Memory (EPROM), Programmable Read Only Memory (PROM), Read Only Memory (ROM), Magnetic Memory, Flash Memory, Magnetic Disk or Optical Disk.
  • SRAM static random access memory
  • EEPROM electrically erasable programmable read-only memory
  • EPROM erasable and Programmable Read Only Memory
  • PROM Programmable Read Only Memory
  • ROM Read Only Memory
  • Magnetic Memory Flash Memory
  • Magnetic Disk Magnetic Disk or Optical Disk.
  • the power supply component 506 provides power for various components of the electronic device 500.
  • the power supply component 506 may include a power management system, one or more power supplies, and other components associated with the generation, management, and distribution of power for the electronic device 500.
  • the multimedia component 508 includes a screen that provides an output interface between the electronic device 500 and the user.
  • the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.
  • the touch panel includes one or more touch sensors to sense touch, sliding, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure related to the touch or slide operation.
  • the multimedia component 508 includes a front camera and/or a rear camera. When the electronic device 500 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
  • the audio component 510 is configured to output and/or input audio signals.
  • the audio component 510 includes a microphone (MIC), and when the electronic device 500 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal.
  • the received audio signal may be further stored in the memory 504 or transmitted via the communication component 516.
  • the audio component 510 further includes a speaker for outputting audio signals.
  • the I/O interface 512 provides an interface between the processing component 502 and a peripheral interface module.
  • the above-mentioned peripheral interface module may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: home button, volume button, start button, and lock button.
  • the sensor component 514 includes one or more sensors for providing the electronic device 500 with various aspects of state evaluation.
  • the sensor component 514 can detect the on/off status of the electronic device 500 and the relative positioning of the components.
  • the component is the display and the keypad of the electronic device 500.
  • the sensor component 514 can also detect the electronic device 500 or the electronic device 500.
  • the position of the component changes, the presence or absence of contact between the user and the electronic device 500, the orientation or acceleration/deceleration of the electronic device 500, and the temperature change of the electronic device 500.
  • the sensor component 514 may include a proximity sensor configured to detect the presence of nearby objects when there is no physical contact.
  • the sensor component 514 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.
  • the sensor component 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
  • the communication component 516 is configured to facilitate wired or wireless communication between the electronic device 500 and other devices.
  • the electronic device 500 can access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G, or 5G), or a combination thereof.
  • the communication component 516 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel.
  • the communication component 516 further includes a near field communication (NFC) module to facilitate short-range communication.
  • the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
  • RFID radio frequency identification
  • IrDA infrared data association
  • UWB ultra-wideband
  • Bluetooth Bluetooth
  • the electronic device 500 may be implemented by one or more application-specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field-available A programmable gate array (FPGA), controller, microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • ASIC application-specific integrated circuits
  • DSP digital signal processors
  • DSPD digital signal processing devices
  • PLD programmable logic devices
  • FPGA field-available A programmable gate array
  • controller microcontroller, microprocessor, or other electronic components are implemented to implement the above methods.
  • a storage medium including instructions such as the memory 504 including instructions, and the foregoing instructions may be executed by the processor 520 of the electronic device 500 to complete the foregoing method.
  • the storage medium may be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, etc.
  • a computer program product includes readable program code, and the readable program code can be executed by the processor 520 of the electronic device 500 to complete the foregoing method.
  • the program code may be stored in a storage medium of the electronic device 500, which may be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium may be ROM, random access memory (RAM) , CD-ROM, magnetic tape, floppy disk and optical data storage device, etc.
  • Fig. 6 is a block diagram showing an electronic device 600 for processing an image according to an exemplary embodiment.
  • the electronic device 600 may be provided as a server.
  • the electronic device 600 includes a processing component 622, which further includes one or more processors, and a memory resource represented by a memory 632, for storing instructions that can be executed by the processing component 622, such as application programs.
  • the application program stored in the memory 632 may include one or more modules each corresponding to a set of instructions.
  • the processing component 622 is configured to execute instructions to execute the above-mentioned image processing method.
  • the electronic device 600 may also include a power supply component 626 configured to perform power management of the electronic device 600, a wired or wireless network interface 650 configured to connect the electronic device 600 to a network, and an input output (I/O) interface 658 .
  • the electronic device 600 can operate based on an operating system stored in the memory 632, such as Windows Server TM , Mac OS X TM , Unix TM , Linux TM , FreeBSD TM or the like.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Analysis (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Image Processing (AREA)

Abstract

公开了一种图像处理方法、装置、电子设备和存储介质,该方法包括:分别获取第一图像和第二图像的主色调信息,以及第一图像和第二图像的移动信息(S11);根据主色调信息和移动信息确定图像区域的背景区域内的过渡颜色信息(S12);以及根据主色调信息和过渡颜色信息展示背景区域内的背景色(S13)。

Description

图像处理方法、装置、电子设备及存储介质
相关申请的交叉引用
本申请要求于2020年1月22日递交的中国专利申请202010075795.8的优先权,在此全文引用上述中国专利申请公开的内容以作为本申请的一部分。
技术领域
本公开涉及数据处理技术领域,尤其涉及一种图像处理方法、装置、电子设备及存储介质。
背景技术
目前,在相关技术中,当在浏览器的网页或者移动APP中进行轮播图展示时,相邻的轮播图展示过程中,轮播图展示区域的背景色保持不变。
轮播图自身的颜色可能与轮播图展示区域的背景色的颜色反差较大,导致轮播图展示效果比较突兀。
发明内容
本公开提供了一种背景色的展示方法、装置、电子设备及存储介质,以至少解决相关技术中轮播图展示区域的背景色保持不变,导致轮播图展示效果比较突兀的问题。本公开的技术方案如下:
根据本公开实施例的第一方面,提供了一种图像处理方法,包括:分别获取第一图像和第二图像的主色调信息,以及所述第一图像和所述第二图像的移动信息,所述第一图像和所述第二图像为在预设的图像区域内按照预设的方向移动展示的两幅相邻图像;根据所述主色调信息和所述移动信息确定所述图像区域的背景区域内的过渡颜色信息,所述过渡颜色信息表示随着所述第一图像和所述第二图像在所述图像区域内的移动而变化的所述第一图像和所述第二图像之间融合的颜色信息;根据所述主色调信息和所述过渡颜色信息展示所述背景区域内的背景色。
可选地,所述根据所述主色调信息和所述移动信息确定所述图像区域的背景区域内的过渡颜色信息的步骤,包括:将所述第一图像的主色调信息在预设的时间内调整为所述第二图像的主色调信息,得到多个中间颜色信息;在移动所述第一图像和所述第二图像的过程中,将所述第二图像在所述图像区域内所占的比例作为所述移动信息,其中,在将所述第一图像和所述第二图像在所述图像区域内按照所述方向移动所述时间时,所述移动信息为100%;将所述移动信息对应的所述中间颜色信息作为所述过渡颜色信息。
可选地,所述根据所述主色调信息和所述移动信息确定所述图像区域的背景区域内的过渡颜色信息的步骤,包括:根据如下公式确定所述过渡颜色信息:Z1=(1-P)﹡X+P﹡Y;其中,所述Z1表示所述过渡颜色信息,所述P表示所述移动信息,所述移动信息为所述第二图像在所述图像区域内所占的比例,所述X表示所述第一图像的主色调信息,所述Y表示所述第二图像的主色调信息。
可选地,所述根据所述主色调信息和所述过渡颜色信息展示所述背景区域内的背景色的步骤,包括:将所述第二图像在所述图像区域内所占的比例作为所述移动信息;当所述移动信息为0%时,将所述背景色设置为所述第一图像的所述主色调信息;当所述移动信息为100%时,将所述背景色设置为所述第二图像的所述主色调信息;当所述移动信息大于0%,且所述移动信息小于100%时,将所述背景色设置为从所述第一图像的所述主色调信息开始,经过所述过渡颜色信息,到所述第二图像的所述主色调信息结束的渐变色,所述过渡颜色信息在所述背景区域内的位置与所述移动信息相对应。
可选地,所述根据所述主色调信息和所述过渡颜色信息展示所述背景区域内的背景色的步骤,还包括:当所述移动信息大于0%,且所述移动信息小于100%时,将所述过渡颜色信息由RGB数值转换为HSB数值,并将所述HSB数值中的亮度值增加预设的数量得到优化过渡颜色信息;将所述背景色设置为从所述第一图像的所述主色调信息开始,经过所述优化过渡颜色信息,到所述第二图像的所述主色调信息结束的渐变色,所述优化过渡颜色信息在所述背景区域内的位置与所述移动信息相对应。
根据本公开实施例的第二方面,提供了一种图像处理装置,包括:获取模块,被配置为分别获取第一图像和第二图像的主色调信息,以及所述第一图像和所述第二图像的移动信息,所述第一图像和所述第二图像为在预设的图像区域内按照预设的方向移动展示的两幅相邻图像;确定模块,被配置为根据所述主色调信息和所述移动信息确定所述图像区域的背景区域内的过渡颜色信息,所述过渡颜色信息表示随着所述第一图像和所述第二图像在所述图像区域内的移动而变化的所述第一图像和所述第二图像之间融合的颜色信息;展示模块,被配置为根据所述主色调信息和所述过渡颜色信息展示所述背景区域内的背景色。
可选地,所述确定模块,包括:颜色调整模块,被配置为将所述第一图像的主色调信息在预设的时间内调整为所述第二图像的主色调信息,得到多个中间颜色信息;信息确定模块,被配置为在移动所述第一图像和所述第二图像的过程中,将所述第二图像在所述图像区域内所占的比例作为所述移动信息,其中,在将所述第一图像和所述第二图像在所述图像区域内按照所述方向移动所述时间时,所述移动信息为100%;颜色确定模块,被配置为将所述移动信息对应的所述中间颜色信息作为所述过渡颜色信息。
可选地,所述确定模块,被配置为根据如下公式确定所述过渡颜色信息:Z1=(1-P)﹡X+P﹡Y;其中,所述Z1表示所述过渡颜色信息,所述P表示所述移动信息,所述移动信息为所述第二图像在所述图像区域内所占的比例,所述X表示所述第一图像的主色调信息,所述Y表示所述第二图像的主色调信息。
可选地,所述展示模块,被配置为:将所述第二图像在所述图像区域内所占的比例作为所述移动信息;当所述移动信息为0%时,将所述背景色设置为所述第一图像的所述主色调信息;当所述移动信息为100%时,将所述背景色设置为所述第二图像的所述主色调信息;当所述移动信息大于0%,且所述移动信息小于100%时,将所述背景色设置为从所述第一图像的所述主色调信息开始,经过所述过渡颜色信息,到所述第二图像的所述主色调信息结束的渐变色,所述过渡颜色信息在所述背景区域内的位置与所述移动信息相对应。
可选地,所述展示模块,还被配置为:当所述移动信息大于0%,且所述移动信息小于100%时, 将所述过渡颜色信息由RGB数值转换为HSB数值,并将所述HSB数值中的亮度值增加预设的数量得到优化过渡颜色信息;将所述背景色设置为从所述第一图像的所述主色调信息开始,经过所述优化过渡颜色信息,到所述第二图像的所述主色调信息结束的渐变色,所述优化过渡颜色信息在所述背景区域内的位置与所述移动信息相对应。
根据本公开实施例的第三方面,提供了一种电子设备,包括:处理器;用于存储所述处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令,以实现如第一方面所述的图像处理方法。
根据本公开实施例的第四方面,提供了一种存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行如第一方面所述的图像处理方法。
根据本公开实施例的第五方面,提供一种计算机程序产品,包括可读性程序代码,所述可读性程序代码可由电子设备的处理器执行以完成如第一方面所述的图像处理方法。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,并不能限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用于解释本公开的原理,并不构成对本公开的不当限定。
图1是根据一示例性实施例示出的一种图像处理方法的步骤流程图。
图2是根据一示例性实施例示出的一种广告位轮播图的背景色展示方法的操作示意图。
图3是根据一示例性实施例示出的一种广告位轮播图的背景色展示方法的效果图。
图4是根据一示例性实施例示出的一种图像处理装置的框图。
图5是根据一示例性实施例示出的一种图像处理电子设备的框图。
图6是根据一示例性实施例示出的一种用于对图像进行处理的电子设备的框图。
具体实施方式
为了使本领域普通人员更好地理解本公开的技术方案,下面将结合附图,对本公开实施例中的技术方案进行清楚、完整地描述。
需要说明的是,本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本公开的实施例能够以除了在这里图示或描述的那些以外的顺序实施。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
图1是根据一示例性实施例示出的一种图像处理方法的步骤流程图。该图像处理方法可以应用于图像处理电子设备中并用于展示轮播图的背景色。例如,电子设备可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等。轮播图可以理解为在预设的图像区域内,按照预设的速度、预设的方向循环展示的图像。背景色可以理解为轮 播图在预设的图像区域内展示时,图像区域的背景区域内的背景色。通常,背景区域可以设置于图像区域的下层,背景区域的面积可以大于图像区域的面积,以便在背景区域内展示背景色时,背景色不会被图像区域完全遮挡。
S11,分别获取第一图像和第二图像的主色调信息,以及第一图像和第二图像的移动信息。
在一些实施例中,第一图像和第二图像可以理解为轮播图中的任意两幅相邻图像。第一图像的主色调信息可以理解为第一图像中各像素点的颜色信息中,占比最多的颜色信息。同理,第二图像的主色调信息可以理解为第二图像中各像素点的颜色信息中,占比最多的颜色信息。当占比最多的颜色信息为一种颜色信息时,主色调信息即占比最多的一种颜色信息;当占比最多的颜色信息为多种颜色信息时,主色调信息可以为占比最多的多种颜色信息的平均值。
第一图像和第二图像的移动信息可以理解为第一图像和第二图像在预设的图像区域内移动的位置信息。在实际应用中,若第一图像和第二图像在预设的图像区域内按照从右向左的方向移动,则该位置信息可以为第二图像在预设的图像区域内所占用面积属于预设的图像区域的总面积的百分比。例如,第二图像占用了预设的图像区域的30%的面积,则第一图像和第二图像的移动信息为30%。
S12,根据主色调信息和移动信息确定图像区域的背景区域内的过渡颜色信息。
在一些实施例中,过渡颜色信息可以理解为随着第一图像和第二图像在预设的图像区域内移动而变化的第一图像和第二图像之间融合的颜色信息。该过渡颜色信息可以表示第一图像和第二图像衔接的位置在背景区域内对应的背景色。
随着第一图像和第二图像在预设的图像区域内的移动,移动信息可以从0逐渐增加,最多可以增加到100%。随着移动信息的增加,过渡颜色信息也相应地改变。
S13,根据主色调信息和过渡颜色信息展示背景区域内的背景色。
在一些实施例中,若第一图像和第二图像在预设的图像区域内按照从右向左的方向移动,第一图像在前,第二图像在后,则第一图像的主色调信息可以作为背景区域最左侧的背景色,第二图像的主色调信息可以作为背景区域最右侧的背景色。过渡颜色信息可以作为第一图像和第二图像衔接的位置在背景区域内对应的背景色。
本公开的实施例分别获取第一图像和第二图像的主色调信息,以及第一图像和第二图像的移动信息。其中,第一图像和第二图像为在预设的图像区域内按照预设的方向移动展示的两幅相邻图像。根据第一图像和第二图像的主色调信息和移动信息确定图像区域的背景区域内的过渡颜色信息,该过渡颜色信息可以表示随着第一图像和第二图像在图像区域内的移动而变化的第一图像和第二图像之间融合的颜色信息。最终,根据第一图像和第二图像的主色调信息和过渡颜色信息展示背景区域内的背景色。
本公开实施例中的过渡颜色信息会随着第一图像和第二图像在图像区域内的移动而变化,根据主色调信息和过渡颜色信息展示的背景色也会随着第一图像和第二图像的移动而变化,避免了背景色保持不变,降低了第一图像和第二图像移动展示效果的突兀性。
在本公开的一种示例性实施例中,在根据主色调信息和移动信息确定图像区域的背景区域内的过渡颜色信息时,可以将第一图像的主色调信息在第一时间内调整为第二图像的主色调信息,得到多个 中间颜色信息。其中,第一时间是指用户预设的时间。第一图像的主色调信息调整为第二图像的主色调信息的过程可以为第一图像的主色调信息渐变为第二图像的主色调信息的过程,得到的多个中间颜色信息可以为第一图像的主色调信息到第二图像的主色调信息之间的多个渐变色。在移动第一图像和第二图像的过程中,将第二图像在预设的图像区域内所占的比例作为移动信息。需要说明的是,第一图像的主色调信息调整为第二图像的主色调信息的时间,与第二图像从预设的图像区域的一侧移动到另一侧的时间相同,即第一图像和第二图像在预设的图像区域内按照第一图像的主色调信息调整为第二图像的主色调信息的时间移动时,移动信息可以为100%。然后,将移动信息对应的中间颜色信息作为过渡颜色信息。
例如,第一图像的主色调信息为X,第二图像的主色调信息为Y,在预设的时间C内将主色调信息X渐变为主色调信息Y,得到一系列的中间颜色信息。该一系列的中间颜色信息表示从主色调信息X过渡到主色调信息Y的每个颜色。设定一百分比Z表示中间颜色信息。当Z为0%时表示中间颜色信息为X,当Z为100%时表示中间颜色信息为Y。再设定另一百分比P表示第一图像和第二图像的移动信息,当P为0%时表示第二图像未移动至预设的图像区域,预设的图像区域展示的是整个第一图像;当P为30%时表示第二图像占预设的图像区域的30%,且第一图像占预设的图像区域的70%;当P为50%时表示第二图像和第一图像各占预设的图像区域的50%;当P为100%时表示第一图像已从预设的图像区域中移出,预设的图像区域展示的是整个第二图像。建立Z与P之间的对应关系,即Z等于P。若P为30%,则将Z为30%时表示的中间颜色信息作为过渡颜色信息。
在本公开的一种示例性实施例中,在根据主色调信息和移动信息确定图像区域的背景区域内的过渡颜色信息时,还可以根据如下公式确定过渡颜色信息:
Z1=(1-P)﹡X+P﹡Y;
其中,Z1表示过渡颜色信息,P表示移动信息,移动信息为第二图像在图像区域内所占的比例,X表示第一图像的主色调信息,Y表示第二图像的主色调信息。
在本公开的一种示例性实施例中,在根据主色调信息和过渡颜色信息展示背景区域内的背景色时,将第二图像在图像区域内所占的比例作为移动信息,当移动信息为0%时,即预设的图像区域内仅展示整个第一图像时,将背景色设置为第一图像的主色调信息;当移动信息为100%时,即预设的图像区域内仅展示整个第二图像时,将背景色设置为第二图像的主色调信息;当移动信息大于0%,且移动信息小于100%时,将背景色设置为从第一图像的主色调信息开始,经过过渡颜色信息,到第二图像的主色调信息结束的渐变色,过渡颜色信息在背景区域内的位置与移动信息相对应。
例如,第一图像和第二图像在预设的图像区域内按照从右向左的方向移动,第一图像在前,第二图像在后。当移动信息为0%时,即预设的图像区域内仅展示整个第一图像时,将背景色设置为第一图像的主色调信息X;当移动信息为100%时,即预设的图像区域内仅展示整个第二图像时,将背景色设置为第二图像的主色调信息Y;当移动信息大于0%,且移动信息小于100%时,将背景色设置为从第一图像的主色调信息X开始,经过过渡颜色信息Z,到第二图像的主色调信息Y结束的渐变色。
在本公开的一种示例性实施例中,若第一图像的主色调信息X与第二图像的主色调信息Y属于对立色(对立色是颜色科学研究中的一类特殊颜色现象,通过对其特殊匹配现象的研究,可以揭示人眼彩 色视觉信息传递的规律),则由第一图像的主色调信息X与第二图像的主色调信息Y生成的过渡颜色信息Z视觉效果较差,因此,需要对过渡颜色信息Z进行优化。在对过渡颜色信息Z进行优化的实际过程中,可以将过渡颜色信息Z由RGB数值转换为HSB数值,并将转换后的HSB数值中的亮度值增加预设的数量得到优化过渡颜色信息Z’。其中,RGB数值表示红、绿、蓝三个通道的颜色,HSB数值表示色相、饱和度、亮度三个维度的颜色。色相的范围为0-360,饱和度的范围为0-100,亮度的范围为0-100。
例如,过渡颜色信息Z的RGB数值为R:181、G:232、B:206,转换后的HSB数值为H:150、S:28、B:75,预设的数量可以设置为20,则将HSB数值中的B增加20得到优化过渡颜色信息Z’的HSB数值为H:150、S:28、B:95。
在展示背景区域内的背景色时,若移动信息大于0%,且移动信息小于100%,则可以将背景色设置为从第一图像的主色调信息X开始,经过优化渡颜色信息Z’,到第二图像的主色调信息Y结束的渐变色。
基于上述关于一种图像处理方法的相关说明,下面介绍一种广告位轮播图的背景色展示方法。其中,每个轮播图可以为一张广告图片,每张广告图片对应一个主题色(即主色调信息),每张广告图片的主题可以为广告图片中占比最大的颜色。具体地,可以获取广告图片中每个像素点的颜色信息,得到多个颜色信息的集合。其中,集合中的颜色信息对应的像素点越多,则该颜色信息的占比越大。将集合中占比最大的颜色信息作为广告图片的主题色。本公开实施例中广告位轮播图的背景色展示方法中,广告位(即图像区域)的尺寸可以与广告图片的尺寸相同,可以理解为广告位最多可以展示一张完整的广告图片。
图2是根据一示例性实施例示出的一种广告位轮播图的背景色展示方法的操作示意图。初始时,在广告位上仅展示广告图片A,则背景色设置为广告图片A的主题色X。用户手动将广告图片A从右向左滑动,或者,广告图片A自动从右向左移动,广告图片B逐渐进入广告位。例如,移动信息依次为10%、50%和80%,在此过程中,背景色不再仅仅是主题色X,而是从左向右依次为主题色X、过渡颜色Z、广告图片B的主题色Y的渐变色。其中,过渡颜色Z可以理解为广告图片A与广告图片B衔接处对应的背景色。整个背景色可以划分为从主题色X到过渡颜色Z的渐变色,和从过渡颜色Z到主题色Y的渐变色。而且,过渡颜色Z会随着广告图片A和广告图片B的移动而变化。用户继续手动将广告图片A从右向左滑动,或者,广告图片A继续自动从右向左移动,直至广告图片A移出广告位,广告位仅展示广告图片B,此时,背景色设置为主题色Y。
图3是根据一示例性实施例示出的一种广告位轮播图的背景色展示方法的效果图。广告图片A的主题色为红色,广告图片B的主题色为蓝色。随着广告图片A和广告图片B的移动,广告位的背景色依次展示为:(1)、完全为红色;(2)、从红色开始、经过过渡色、到蓝色结束;(3)、完全为蓝色。
当广告位需要展示的轮播图有多个广告图片时,例如,三个或三个以上。可以预先确定每个广告图片对应的主题色,并确定相邻两个广告图片之间的过渡颜色。在广告位展示广告图片时,可以根据相应的主题色、过渡颜色等展示广告位的背景色。
本公开实施例中的技术方案应用于广告位轮播图的背景色展示时,为广告位增加了背景色过渡变化规则,可以将广告位中广告图片的颜色与背景色进行融合,展示有过渡效果的背景色,降低了广告图片的突兀性,突出广告图片的可视性,增强了广告图片的宣传效果,渲染了广告图片的环境氛围。
图4是根据一示例性实施例示出的一种图像处理装置的框图。该装置具体可以包括如下模块。
获取模块41,被配置为分别获取第一图像和第二图像的主色调信息,以及所述第一图像和所述第二图像的移动信息,所述第一图像和所述第二图像为在预设的图像区域内按照预设的方向移动展示的两幅相邻图像;
确定模块42,被配置为根据所述主色调信息和所述移动信息确定图像区域的背景区域内的过渡颜色信息,所述过渡颜色信息表示随着所述第一图像和所述第二图像在所述图像区域内的移动而变化的所述第一图像和所述第二图像之间融合的颜色信息;
展示模块43,被配置为根据所述主色调信息和所述过渡颜色信息展示所述背景区域内的背景色。
在本公开的一种示例性实施例中,所述确定模块42,包括:
颜色调整模块,被配置为将所述第一图像的主色调信息在预设的时间内调整为所述第二图像的主色调信息,得到多个中间颜色信息;
信息确定模块,被配置为在移动所述第一图像和所述第二图像的过程中,将所述第二图像在所述图像区域内所占的比例作为所述移动信息,其中,在将所述第一图像和所述第二图像在所述图像区域内按照所述方向移动所述时间时,所述移动信息为100%;
颜色确定模块,被配置为将所述移动信息对应的所述中间颜色信息作为所述过渡颜色信息。
在本公开的一种示例性实施例中,所述确定模块42,被配置为根据如下公式确定所述过渡颜色信息:
Z1=(1-P)﹡X+P﹡Y;
其中,所述Z1表示所述过渡颜色信息,所述P表示所述移动信息,所述移动信息为所述第二图像在所述图像区域内所占的比例,所述X表示所述第一图像的主色调信息,所述Y表示所述第二图像的主色调信息。
在本公开的一种示例性实施例中,所述展示模块43,被配置为:将所述第二图像在所述图像区域内所占的比例作为所述移动信息;当所述移动信息为0%时,将所述背景色设置为所述第一图像的所述主色调信息;当所述移动信息为100%时,将所述背景色设置为所述第二图像的所述主色调信息;当所述移动信息大于0%,且所述移动信息小于100%时,将所述背景色设置为从所述第一图像的所述主色调信息开始,经过所述过渡颜色信息,到所述第二图像的所述主色调信息结束的渐变色,所述过渡颜色信息在所述背景区域内的位置与所述移动信息相对应。
在本公开的一种示例性实施例中,所述展示模块43,还被配置为:当所述移动信息大于0%,且所述移动信息小于100%时,将所述过渡颜色信息由RGB数值转换为HSB数值,并将所述HSB数值中的亮度值增加预设的数量得到优化过渡颜色信息;将所述背景色设置为从所述第一图像的所述主色调信息开始,经过所述优化过渡颜色信息,到所述第二图像的所述主色调信息结束的渐变色,所述优化过渡颜色信息在所述背景区域内的位置与所述移动信息相对应。
关于上述实施例中的装置,其中各个模块执行操作的具体方式已经在有关该方法的实施例中进行了详细描述,此处将不做详细阐述说明。
图5是根据一示例性实施例示出的一种图像处理电子设备500的框图。
参照图5,电子设备500可以包括以下一个或多个组件:处理组件502,存储器504,电力组件506,多媒体组件508,音频组件510,输入/输出(I/O)的接口512,传感器组件514,以及通信组件516。
处理组件502通常控制电子设备500的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件502可以包括一个或多个处理器520来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件502可以包括一个或多个模块,便于处理组件502和其他组件之间的交互。例如,处理组件502可以包括多媒体模块,以方便多媒体组件508和处理组件502之间的交互。
存储器504被配置为存储各种类型的数据以支持在电子设备500的操作。这些数据的示例包括用于在电子设备500上操作的任何应用程序或方法的指令,联系人数据,电话簿数据,消息,图片,视频等。存储器504可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(SRAM),电可擦除可编程只读存储器(EEPROM),可擦除可编程只读存储器(EPROM),可编程只读存储器(PROM),只读存储器(ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件506为电子设备500的各种组件提供电力。电源组件506可以包括电源管理***,一个或多个电源,及其他与为电子设备500生成、管理和分配电力相关联的组件。
多媒体组件508包括在电子设备500和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(LCD)和触摸面板(TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件508包括一个前置摄像头和/或后置摄像头。当电子设备500处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜***或具有焦距和光学变焦能力。
音频组件510被配置为输出和/或输入音频信号。例如,音频组件510包括一个麦克风(MIC),当电子设备500处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器504或经由通信组件516发送。在一些实施例中,音频组件510还包括一个扬声器,用于输出音频信号。
I/O接口512为处理组件502和***接口模块之间提供接口,上述***接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件514包括一个或多个传感器,用于为电子设备500提供各个方面的状态评估。例如,传感器组件514可以检测到电子设备500的打开/关闭状态,组件的相对定位,例如所述组件为电子设 备500的显示器和小键盘,传感器组件514还可以检测电子设备500或电子设备500一个组件的位置改变,用户与电子设备500接触的存在或不存在,电子设备500方位或加速/减速和电子设备500的温度变化。传感器组件514可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件514还可以包括光传感器,如CMOS或CCD图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件514还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件516被配置为便于电子设备500和其他设备之间有线或无线方式的通信。电子设备500可以接入基于通信标准的无线网络,如WiFi,运营商网络(如2G、3G、4G或5G),或它们的组合。在一个示例性实施例中,通信组件516经由广播信道接收来自外部广播管理***的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件516还包括近场通信(NFC)模块,以促进短程通信。例如,在NFC模块可基于射频识别(RFID)技术,红外数据协会(IrDA)技术,超宽带(UWB)技术,蓝牙(BT)技术和其他技术来实现。
在示例性实施例中,电子设备500可以被一个或多个应用专用集成电路(ASIC)、数字信号处理器(DSP)、数字信号处理设备(DSPD)、可编程逻辑器件(PLD)、现场可编程门阵列(FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种包括指令的存储介质,例如包括指令的存储器504,上述指令可由电子设备500的处理器520执行以完成上述方法。存储介质可以是非临时性计算机可读存储介质,例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
在示例性实施例中,还提供了一种计算机程序产品,该计算机程序产品包括可读性程序代码,该可读性程序代码可由电子设备500的处理器520执行以完成上述方法。该程序代码可以存储在电子设备500的存储介质中,该存储介质可以是非临时性计算机可读存储介质,例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。
图6是根据一示例性实施例示出的一种用于对图像进行处理的电子设备600的框图。例如,电子设备600可以被提供为一服务器。参照图6,电子设备600包括处理组件622,其进一步包括一个或多个处理器,以及由存储器632所代表的存储器资源,用于存储可由处理组件622的执行的指令,例如应用程序。存储器632中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的模块。此外,处理组件622被配置为执行指令,以执行上述图像处理方法。
电子设备600还可以包括一个电源组件626被配置为执行电子设备600的电源管理,一个有线或无线网络接口650被配置为将电子设备600连接到网络,和一个输入输出(I/O)接口658。电子设备600可以操作基于存储在存储器632的操作***,例如Windows Server TM,Mac OS X TM,Unix TM,Linux TM,FreeBSD TM或类似。
本领域技术人员在考虑说明书及实践这里公开的发明后,将容易想到本公开的其它实施方案。本 申请旨在涵盖本公开的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本公开的一般性原理并包括本公开未公开的本技术领域中的公知常识或惯用技术手段。说明书和实施例仅被视为示例性的,本公开的真正范围和精神由下面的权利要求指出。
本公开所有实施例均可以单独被执行,也可以与其他实施例相结合被执行,均视为本公开要求的保护范围。
应当理解的是,本公开并不局限于上面已经描述并在附图中示出的精确结构,并且可以在不脱离其范围进行各种修改和改变。本公开的范围仅由所附的权利要求来限制。

Claims (16)

  1. 一种图像处理方法,包括:
    分别获取第一图像和第二图像的主色调信息,以及所述第一图像和所述第二图像的移动信息,所述第一图像和所述第二图像为在图像区域内按照预设的方向移动展示的两幅相邻图像;
    根据所述主色调信息和所述移动信息确定所述图像区域的背景区域内的过渡颜色信息,所述过渡颜色信息表示随着所述第一图像和所述第二图像在所述图像区域内的移动而变化的所述第一图像和所述第二图像之间融合的颜色信息;
    根据所述主色调信息和所述过渡颜色信息展示所述背景区域内的背景色。
  2. 根据权利要求1所述的方法,所述根据所述主色调信息和所述移动信息确定所述图像区域的背景区域内的过渡颜色信息包括:
    将所述第一图像的主色调信息在第一时间内调整为所述第二图像的主色调信息,得到多个中间颜色信息;
    在移动所述第一图像和所述第二图像的过程中,将所述第二图像在所述图像区域内所占的比例作为所述移动信息,其中,在将所述第一图像和所述第二图像在所述图像区域内按照所述方向移动所述第一时间时,所述移动信息为100%;
    将所述移动信息对应的所述中间颜色信息作为所述过渡颜色信息。
  3. 根据权利要求1所述的方法,所述根据所述主色调信息和所述移动信息确定所述图像区域的背景区域内的过渡颜色信息包括:
    根据如下公式确定所述过渡颜色信息:
    Z1=(1-P)﹡X+P﹡Y;
    其中,所述Z1表示所述过渡颜色信息,所述P表示所述移动信息,所述移动信息为所述第二图像在所述图像区域内所占的比例,所述X表示所述第一图像的主色调信息,所述Y表示所述第二图像的主色调信息。
  4. 根据权利要求1所述的方法,所述根据所述主色调信息和所述过渡颜色信息展示所述背景区域内的背景色包括:
    将所述第二图像在所述图像区域内所占的比例作为所述移动信息;
    当所述移动信息为0%时,将所述背景色设置为所述第一图像的所述主色调信息;
    当所述移动信息为100%时,将所述背景色设置为所述第二图像的所述主色调信息;
    当所述移动信息大于0%,且所述移动信息小于100%时,将所述背景色设置为从所述第一图像的所述主色调信息开始,经过所述过渡颜色信息,到所述第二图像的所述主色调信息结束的渐变色,所述过渡颜色信息在所述背景区域内的位置与所述移动信息相对应。
  5. 根据权利要求4所述的方法,所述根据所述主色调信息和所述过渡颜色信息展示所述背景区域内的背景色还包括:
    当所述移动信息大于0%,且所述移动信息小于100%时,将所述过渡颜色信息由RGB数值转换为HSB数值,并将所述HSB数值中的亮度值增加预设的数量得到优化过渡颜色信息;
    将所述背景色设置为从所述第一图像的所述主色调信息开始,经过所述优化过渡颜色信息,到所述第二图像的所述主色调信息结束的渐变色,所述优化过渡颜色信息在所述背景区域内的位置与所述移动信息相对应。
  6. 一种图像处理装置,包括:
    获取模块,被配置为分别获取第一图像和第二图像的主色调信息,以及所述第一图像和所述第二图像的移动信息,所述第一图像和所述第二图像为在预设的图像区域内按照预设的方向移动展示的两幅相邻图像;
    确定模块,被配置为根据所述主色调信息和所述移动信息确定所述图像区域的背景区域内的过渡颜色信息,所述过渡颜色信息表示随着所述第一图像和所述第二图像在所述图像区域内的移动而变化的所述第一图像和所述第二图像之间融合的颜色信息;
    展示模块,被配置为根据所述主色调信息和所述过渡颜色信息展示所述背景区域内的背景色。
  7. 根据权利要求6所述的装置,所述确定模块,包括:
    颜色调整模块,被配置为将所述第一图像的主色调信息在预设的时间内调整为所述第二图像的主色调信息,得到多个中间颜色信息;
    信息确定模块,被配置为在移动所述第一图像和所述第二图像的过程中,将所述第二图像在所述图像区域内所占的比例作为所述移动信息,其中,在将所述第一图像和所述第二图像在所述图像区域内按照所述方向移动所述时间时,所述移动信息为100%;
    颜色确定模块,被配置为将所述移动信息对应的所述中间颜色信息作为所述过渡颜色信息。
  8. 根据权利要求6所述的装置,所述确定模块,被配置为根据如下公式确定所述过渡颜色信息:
    Z1=(1-P)﹡X+P﹡Y;
    其中,所述Z1表示所述过渡颜色信息,所述P表示所述移动信息,所述移动信息为所述第二图像在所述图像区域内所占的比例,所述X表示所述第一图像的主色调信息,所述Y表示所述第二图像的主色调信息。
  9. 根据权利要求6所述的装置,所述展示模块,被配置为:
    将所述第二图像在所述图像区域内所占的比例作为所述移动信息;
    当所述移动信息为0%时,将所述背景色设置为所述第一图像的所述主色调信息;
    当所述移动信息为100%时,将所述背景色设置为所述第二图像的所述主色调信息;
    当所述移动信息大于0%,且所述移动信息小于100%时,将所述背景色设置为从所述第一图像的所述主色调信息开始,经过所述过渡颜色信息,到所述第二图像的所述主色调信息结束的渐变色,所述过渡颜色信息在所述背景区域内的位置与所述移动信息相对应。
  10. 根据权利要求9所述的装置,所述展示模块,还被配置为:
    当所述移动信息大于0%,且所述移动信息小于100%时,将所述过渡颜色信息由RGB数值转换为HSB数值,并将所述HSB数值中的亮度值增加预设的数量得到优化过渡颜色信息;
    将所述背景色设置为从所述第一图像的所述主色调信息开始,经过所述优化过渡颜色信息,到所 述第二图像的所述主色调信息结束的渐变色,所述优化过渡颜色信息在所述背景区域内的位置与所述移动信息相对应。
  11. 一种电子设备,包括:
    处理器;
    用于存储所述处理器可执行指令的存储器;
    其中,所述处理器被配置为执行所述指令,以实现一种图像处理方法,所述方法包括:
    分别获取第一图像和第二图像的主色调信息,以及所述第一图像和所述第二图像的移动信息,所述第一图像和所述第二图像为在预设的图像区域内按照预设的方向移动展示的两幅相邻图像;
    根据所述主色调信息和所述移动信息确定所述图像区域的背景区域内的过渡颜色信息,所述过渡颜色信息表示随着所述第一图像和所述第二图像在所述图像区域内的移动而变化的所述第一图像和所述第二图像之间融合的颜色信息;
    根据所述主色调信息和所述过渡颜色信息展示所述背景区域内的背景色。
  12. 根据权利要求11所述的电子设备,所述根据所述主色调信息和所述移动信息确定所述图像区域的背景区域内的过渡颜色信息包括:
    将所述第一图像的主色调信息在第一时间内调整为所述第二图像的主色调信息,得到多个中间颜色信息;
    在移动所述第一图像和所述第二图像的过程中,将所述第二图像在所述图像区域内所占的比例作为所述移动信息,其中,在将所述第一图像和所述第二图像在所述图像区域内按照所述方向移动所述第一时间时,所述移动信息为100%;
    将所述移动信息对应的所述中间颜色信息作为所述过渡颜色信息。
  13. 根据权利要求11所述的电子设备,所述根据所述主色调信息和所述移动信息确定所述图像区域的背景区域内的过渡颜色信息包括:
    根据如下公式确定所述过渡颜色信息:
    Z1=(1-P)﹡X+P﹡Y;
    其中,所述Z1表示所述过渡颜色信息,所述P表示所述移动信息,所述移动信息为所述第二图像在所述图像区域内所占的比例,所述X表示所述第一图像的主色调信息,所述Y表示所述第二图像的主色调信息。
  14. 根据权利要求11所述的电子设备,所述根据所述主色调信息和所述过渡颜色信息展示所述背景区域内的背景色包括:
    将所述第二图像在所述图像区域内所占的比例作为所述移动信息;
    当所述移动信息为0%时,将所述背景色设置为所述第一图像的所述主色调信息;
    当所述移动信息为100%时,将所述背景色设置为所述第二图像的所述主色调信息;
    当所述移动信息大于0%,且所述移动信息小于100%时,将所述背景色设置为从所述第一图像的 所述主色调信息开始,经过所述过渡颜色信息,到所述第二图像的所述主色调信息结束的渐变色,所述过渡颜色信息在所述背景区域内的位置与所述移动信息相对应。
  15. 根据权利要求14所述的电子设备,所述根据所述主色调信息和所述过渡颜色信息展示所述背景区域内的背景色还包括:
    当所述移动信息大于0%,且所述移动信息小于100%时,将所述过渡颜色信息由RGB数值转换为HSB数值,并将所述HSB数值中的亮度值增加预设的数量得到优化过渡颜色信息;
    将所述背景色设置为从所述第一图像的所述主色调信息开始,经过所述优化过渡颜色信息,到所述第二图像的所述主色调信息结束的渐变色,所述优化过渡颜色信息在所述背景区域内的位置与所述移动信息相对应。
  16. 一种存储介质,当所述存储介质中的指令由电子设备的处理器执行时,使得所述电子设备能够执行一种图像处理方法,所述方法包括:
    分别获取第一图像和第二图像的主色调信息,以及所述第一图像和所述第二图像的移动信息,所述第一图像和所述第二图像为在预设的图像区域内按照预设的方向移动展示的两幅相邻图像;
    根据所述主色调信息和所述移动信息确定所述图像区域的背景区域内的过渡颜色信息,所述过渡颜色信息表示随着所述第一图像和所述第二图像在所述图像区域内的移动而变化的所述第一图像和所述第二图像之间融合的颜色信息;
    根据所述主色调信息和所述过渡颜色信息展示所述背景区域内的背景色。
PCT/CN2021/073179 2020-01-22 2021-01-22 图像处理方法、装置、电子设备及存储介质 WO2021147976A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010075795.8A CN111292393A (zh) 2020-01-22 2020-01-22 图像处理方法、装置、电子设备及存储介质
CN202010075795.8 2020-01-22

Publications (1)

Publication Number Publication Date
WO2021147976A1 true WO2021147976A1 (zh) 2021-07-29

Family

ID=71029196

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/073179 WO2021147976A1 (zh) 2020-01-22 2021-01-22 图像处理方法、装置、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN111292393A (zh)
WO (1) WO2021147976A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111292393A (zh) * 2020-01-22 2020-06-16 北京达佳互联信息技术有限公司 图像处理方法、装置、电子设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7289127B1 (en) * 2005-04-25 2007-10-30 Apple, Inc. Multi-conic gradient generation
CN104299252A (zh) * 2014-10-17 2015-01-21 惠州Tcl移动通信有限公司 一种图片显示切换的过渡方法及其***
CN107102863A (zh) * 2017-05-08 2017-08-29 广州视源电子科技股份有限公司 一种根据轮播图片自动确定轮播区域背景色的方法及***
CN109032492A (zh) * 2018-07-27 2018-12-18 腾讯音乐娱乐科技(深圳)有限公司 一种切歌的方法及装置
CN109360261A (zh) * 2018-09-28 2019-02-19 北京达佳互联信息技术有限公司 图像处理方法、装置、电子设备及存储介质
CN111292393A (zh) * 2020-01-22 2020-06-16 北京达佳互联信息技术有限公司 图像处理方法、装置、电子设备及存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164205B (zh) * 2011-12-15 2016-08-24 阿里巴巴集团控股有限公司 一种轮播效果的切换方法及装置
US10534809B2 (en) * 2016-08-10 2020-01-14 Zeekit Online Shopping Ltd. Method, system, and device of virtual dressing utilizing image processing, machine learning, and computer vision

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7289127B1 (en) * 2005-04-25 2007-10-30 Apple, Inc. Multi-conic gradient generation
CN104299252A (zh) * 2014-10-17 2015-01-21 惠州Tcl移动通信有限公司 一种图片显示切换的过渡方法及其***
CN107102863A (zh) * 2017-05-08 2017-08-29 广州视源电子科技股份有限公司 一种根据轮播图片自动确定轮播区域背景色的方法及***
CN109032492A (zh) * 2018-07-27 2018-12-18 腾讯音乐娱乐科技(深圳)有限公司 一种切歌的方法及装置
CN109360261A (zh) * 2018-09-28 2019-02-19 北京达佳互联信息技术有限公司 图像处理方法、装置、电子设备及存储介质
CN111292393A (zh) * 2020-01-22 2020-06-16 北京达佳互联信息技术有限公司 图像处理方法、装置、电子设备及存储介质

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
JCWOOO_0: "ViewPager: Gradual Background Transition While Swiping Pages", 18 September 2019 (2019-09-18), XP009529362, Retrieved from the Internet <URL:https://blog.csdn.net/qq_34247200/article/details/100985014> *

Also Published As

Publication number Publication date
CN111292393A (zh) 2020-06-16

Similar Documents

Publication Publication Date Title
KR101831077B1 (ko) 색역 모드 스위칭 방법 및 장치
US10921584B2 (en) Method and device for displaying image
EP3121699A1 (en) Method and device for displaying badge of icon
US10109248B2 (en) Method and device for adjusting liquid crystal display
WO2019109563A1 (zh) 显示界面图像的方法和装置
JP6461107B2 (ja) ピクチャ表示方法および装置
US11062640B2 (en) Screen display method and screen display device
WO2022199038A1 (zh) 画面调节参数调整方法及装置
US20220327749A1 (en) Method and electronic device for processing images
US10951816B2 (en) Method and apparatus for processing image, electronic device and storage medium
CN111953903A (zh) 拍摄方法、装置、电子设备及存储介质
CN105677352B (zh) 应用图标颜色的设置方法和装置
WO2021147976A1 (zh) 图像处理方法、装置、电子设备及存储介质
CN104536713B (zh) 显示图像中的字符的方法及装置
EP3975548B1 (en) Photographing method and apparatus, terminal, and storage medium
CN112905141A (zh) 屏幕显示方法及装置、计算机存储介质
WO2021169810A1 (zh) 视频处理方法及服务器
WO2023240624A1 (zh) 亮度调整方法及装置、存储介质
CN113296644B (zh) 显示控制方法及装置、电子设备、计算机可读存储介质
CN110876013B (zh) 确定图像分辨率的方法及装置、电子设备及存储介质
US11363190B2 (en) Image capturing method and device
CN115705174A (zh) 显示控制方法、装置、电子设备及存储介质
CN118102080A (zh) 图像拍摄方法、装置、终端及存储介质
CN118118789A (zh) 图像生成方法、装置以及存储介质
CN112217989A (zh) 图像显示方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21743631

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21743631

Country of ref document: EP

Kind code of ref document: A1