CN108881739A - Image generating method, device, terminal and storage medium - Google Patents

Image generating method, device, terminal and storage medium Download PDF

Info

Publication number
CN108881739A
CN108881739A CN201810790667.4A CN201810790667A CN108881739A CN 108881739 A CN108881739 A CN 108881739A CN 201810790667 A CN201810790667 A CN 201810790667A CN 108881739 A CN108881739 A CN 108881739A
Authority
CN
China
Prior art keywords
matrix
luminance component
image
original image
convolution kernel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810790667.4A
Other languages
Chinese (zh)
Other versions
CN108881739B (en
Inventor
陈志博
石楷弘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201810790667.4A priority Critical patent/CN108881739B/en
Publication of CN108881739A publication Critical patent/CN108881739A/en
Application granted granted Critical
Publication of CN108881739B publication Critical patent/CN108881739B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/70Circuitry for compensating brightness variation in the scene
    • H04N23/741Circuitry for compensating brightness variation in the scene by increasing the dynamic range of the image compared to the dynamic range of the electronic image sensors
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/80Camera processing pipelines; Components thereof

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the invention discloses a kind of image generating method, device, terminal and storage mediums, belong to field of computer technology.This method includes:According to the collected optical signals of photosensitive element multiple in imaging sensor, obtain original image matrix, original image matrix includes the image information of multiple photosensitive element outputs, luminance component matrix is obtained according to original image matrix, luminance component matrix is used to indicate the luminance component that the image information of multiple photosensitive element outputs includes, according to luminance component matrix and pre-set first convolution kernel, it obtains and matched second convolution kernel of original image matrix, according to the second convolution kernel, process of convolution is carried out to original image matrix, according to treated, image array generates image.So that the signal detail ingredient in original image matrix enhances, effectively improves in image and there is a problem of that part is excessive lightness or darkness, improve the quality of the image of generation.

Description

Image generating method, device, terminal and storage medium
Technical field
The present embodiments relate to field of computer technology, in particular to a kind of image generating method, device, terminal and deposit Storage media.
Background technique
Imaging sensor is a kind of element for converting optical signals into electric signal, with the continuous progress of science and technology and multimedia The fast development of technology, imaging sensor are widely used in a plurality of types of terminals, and terminal passes through the image sensing configured Device can acquire optical signal, and electric signal made of being converted according to optical signal generates image.
In the related technology, imaging sensor has the working range that can normally measure light signal strength, when in local environment Optical signal signal strength it is too high or too low and when having exceeded the working range, the image that will lead to imaging sensor generation is deposited In high brightness blind area or low-light level blind area.In order to avoid the problem, imaging sensor can be according to the optical signal of external environment estimation The parameters such as gain, sampling time of amplifier are arranged in intensity, can be with after imaging sensor converts optical signals into electric signal Electric signal is amplified by amplifier, image is generated according to amplified electric signal later, is equivalent to and expands image biography The working range of sensor, being avoided as much as image has high brightness blind area or low-light level blind area.
Above scheme is only capable of avoiding the problem that image to a certain extent, and there are high brightness blind area or low-light level blind areas, but scheme It is also possible to can there is a problem of that part is excessive lightness or darkness as in, causes picture quality bad.
Summary of the invention
The embodiment of the invention provides a kind of image generating method, device, terminal and storage mediums, can solve related skill Art there are the problem of.The technical solution is as follows:
On the one hand, a kind of image generating method is provided, the method includes:
According to the collected optical signals of photosensitive element multiple in imaging sensor, original image matrix is obtained, it is described original Image array includes the image information of the multiple photosensitive element output;
Luminance component matrix is obtained according to the original image matrix, the luminance component matrix is for indicating the multiple The luminance component that the image information of photosensitive element output includes;
According to the luminance component matrix and pre-set first convolution kernel, acquisition is matched with the original image matrix The second convolution kernel;
According to second convolution kernel, process of convolution is carried out to the original image matrix, according to treated image moment Battle array generates image.
On the other hand, a kind of video generation device is provided, described device includes:
Original acquisition module, for obtaining original according to the collected optical signals of photosensitive element multiple in imaging sensor Image array, the original image matrix include the image information of the multiple photosensitive element output;
Luminance acquisition module, for obtaining luminance component matrix, the luminance component square according to the original image matrix The luminance component that battle array includes for indicating the image information of the multiple photosensitive element output;
Convolution kernel obtains module, for according to the luminance component matrix and pre-set first convolution kernel, obtain with Matched second convolution kernel of original image matrix;
Image generation module, for carrying out process of convolution, root to the original image matrix according to second convolution kernel According to treated, image array generates image.
On the other hand, provide a kind of for generating the terminal of image, the terminal includes processor and memory, described It is stored at least one instruction, at least one section of program, code set or instruction set in memory, it is described instruction, described program, described Code set or described instruction collection are loaded by the processor and are executed to realize such as behaviour performed in described image generation method Make.
In another aspect, providing a kind of computer readable storage medium, it is stored in the computer readable storage medium At least one instruction, at least one section of program, code set or instruction set, described instruction, described program, the code set or the finger Collection is enabled to be loaded by processor and had to realize such as possessed operation in described image generation method.
Technical solution bring beneficial effect provided in an embodiment of the present invention includes at least:
Method, apparatus, terminal and storage medium provided in an embodiment of the present invention, by obtaining original image matrix, according to The original image matrix obtains luminance component matrix, and according to the luminance component matrix and pre-set first convolution kernel, obtains Take with matched second convolution kernel of original image matrix, based on second convolution verification original image matrix carry out process of convolution, According to treated, image array generates image, can enhance the details ingredient in image, effectively improve present in image The excessive lightness or darkness problem in part, improves picture quality.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the embodiment of the present invention Example, for those of ordinary skill in the art, without creative efforts, can also obtain according to these attached drawings Obtain other attached drawings.
Fig. 1 is a kind of flow chart of image generating method provided in an embodiment of the present invention;
Fig. 2 is a kind of sigmoid mapping function schematic diagram provided in an embodiment of the present invention;
Fig. 3 is operating process schematic diagram provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of video generation device provided in an embodiment of the present invention;
Fig. 5 is a kind of structural schematic diagram of terminal provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing to the present invention Embodiment is described in further detail.
In the related technology, exceed image sensing when the light signal strength in imaging sensor local environment is too high or too low When the working range that device can be measured normally, imaging sensor passes through the gain of setting amplifier, using amplifier to electric signal It amplifies, thus the working range of enlarged image sensor, avoids in image that there are high brightness blind area or low-light level blind areas.But The program is only capable of avoiding the problem that image to a certain extent that there are high brightness blind area or low-light level blind areas, but is also possible in image Can there is a problem of that part is excessive lightness or darkness, cause picture quality bad.
It, can be according to original image matrix and pre-set and the embodiment of the invention provides a kind of image generating method First convolution kernel obtain with matched second convolution kernel of original image matrix, based on second convolution check original image matrix into It is excessive lightness or darkness to improve part to enhance the details ingredient of the image information in original image matrix for row process of convolution Problem improves picture quality.
The embodiment of the present invention can be applied under any scene for generating image.For example, when terminal needs to shoot photo, Relatively clear photo can be generated using method provided in an embodiment of the present invention.It, can be with alternatively, when terminal needs to shoot video Multiple image is generated using method provided in an embodiment of the present invention, finally gets the video of multiple image composition.
Fig. 1 is a kind of flow chart of image generating method provided in an embodiment of the present invention.The execution master of the embodiment of the present invention Body is terminal, and referring to Fig. 1, this method includes:
101, terminal obtains original image matrix according to the collected optical signals of photosensitive element multiple in imaging sensor.
Wherein, which can be a plurality of types of equipment such as mobile phone, tablet computer, camera, and the terminal is configured with Imaging sensor and display screen, can be generated image by imaging sensor, and show the image on the display screen.Its In, imaging sensor includes multiple photosensitive elements, and each photosensitive element is used to incude the optical signal in external environment, and will induction To optical signal be converted into corresponding electric signal, the subsequent electric signal according to the output of multiple photosensitive elements can be got accordingly Image, include multiple pixel units corresponding with multiple photosensitive elements in image, the electric signal of photosensitive element output is For the image information of respective pixel unit in image.
In embodiments of the present invention, after multiple photosensitive elements acquire optical signals and export electric signal, terminal is according to multiple senses The collected optical signal of optical element obtains original image matrix, which includes the image of multiple photosensitive element outputs Information, it is subsequent image to be generated according to the original image matrix.
102, terminal obtains luminance component matrix according to original image matrix, and luminance component matrix is for indicating multiple photosensitive The luminance component that the image information of element output includes, executes step 103 and 105.
In the embodiment of the present invention, after terminal gets original image matrix, image is not directly generated, but will be to original Beginning image array is handled, and further according to treated, image array generates image, enhances the details ingredient in image, to avoid Occur there is a problem of that part is excessive lightness or darkness in image.
For this purpose, terminal extracts the luminance component that each image information for including in original image matrix includes, brightness is constituted Component Matrices.
In a kind of possible implementation, each image information in original image matrix includes red, green and blue The color of three Color Channels, each image information is obtained by the color overlaid of three Color Channels, i.e., red, green and indigo plant Three Color Channels of color collectively form the color information under RGB (Red/Green/Blue, red/green) space.In order to Extract light intensity level is converted each image information in original image matrix to a kind of YUV (color coding staff by rgb space Method indicates brightness and coloration) space, image is identified using luminance component and two color difference components under yuv space, because The luminance component and color difference components that this available each image information includes, thus according to multiple figures in original image matrix As the luminance component that information includes constitutes luminance component matrix.
In a kind of possible implementation, the luminance component for including by each image information in original image matrix is constituted Luminance component matrix as the first luminance component matrix, then the first luminance component matrix includes what multiple photosensitive elements exported The luminance component that image information includes.Terminal carries out the first luminance component matrix according to pre-set third convolution kernel Process of convolution obtains the second luminance component matrix.
Wherein, third convolution kernel is right for carrying out convolution operation with the various pieces in the first luminance component matrix respectively The first luminance component matrix carries out Local treatment, has to noise jamming part present in the first luminance component matrix certain Inhibiting effect, slow down noise jamming and the first luminance component matrix bring adversely affected.
For example, the third convolution kernel can be all 1's matrix of 3x 3, it is specific as follows:
103, terminal is matched according to luminance component matrix and pre-set first convolution kernel, acquisition with original image matrix The second convolution kernel.
In embodiments of the present invention, terminal can preset default mapping function and the first convolution kernel, pre- by calling If mapping function, map operation is carried out to the luminance component matrix obtained, obtains scaling square corresponding with luminance component matrix Battle array.And according to the scaled matrix, processing is zoomed in and out to the first convolution kernel, obtains the second convolution kernel, which is the The convolution kernel that one convolution kernel obtains after scaling, and since second convolution kernel is according to the determination of luminance component matrix, phase It is matched when in original image matrix.Wherein, default mapping function can be set according to actual needs.
In a kind of possible implementation, zooming in and out processing to the first convolution kernel according to scaled matrix may include:It will Scaled matrix carries out being added calculating with the first convolution kernel, alternatively, scaled matrix is subjected to the calculating that is multiplied with the first convolution kernel, or Carry out other operations.
For example, the default mapping function can be sigmoid function, as shown in Fig. 2, straight line indicates original image number in figure According to after sigmoid Function Mapping, curve in available figure can be seen that original graph by comparison straight line and curve As in data highlights data and dark portion data be stretched, brightness data placed in the middle then have certain compression, therefore, this to reflect Penetrate the details that can effectively enhance highlights and dark portion.
In alternatively possible implementation, the default mapping function can be also used for only to hi-lite at Reason achievees the effect that only to inhibit image local area excessively bright to low-light level part without processing.
104, terminal carries out process of convolution to original image matrix according to the second convolution kernel, according to treated image moment Battle array generates image.
Terminal carries out convolution operation according to the second convolution kernel, to original image, the image array that obtains that treated, according to place Image array after reason generates image, can enhance the details ingredient in image, and it is excessive lightness or darkness to be avoided as much as part Problem.
In addition, the convolution process can also carry out a degree of sharpening or fuzzy to image, with specific reference to the volume of selection Product core determines.Also, by the step-length for changing convolution kernel, the resolution ratio of adjustable output image, therefore this method can answer Under scene for needing to be adjusted image resolution ratio.
Wherein, imaging sensor can provide interface for terminal, when the imaging sensor image array that gets that treated When, treated image array is exported by interface, terminal by interface acquisition should treated image array, in display screen Corresponding image is shown on curtain.For example, the operating process schematic diagram of the embodiment of the present invention is as shown in Figure 3.
It should be noted that terminal can be further processed the image after generating image.For example, will The image of generation is trained neural network model as sample image, since the picture quality is preferable, is able to ascend The performance of neural network model.Alternatively, the image generated can be also used for recognition of face, it, can since picture quality is preferable To improve the accuracy rate of recognition of face.Alternatively, can be continuously shot using method provided in an embodiment of the present invention, generate more A image, thus by multiple image construction picture clearly video.
105, terminal obtains the time for exposure adjusted according to luminance component matrix, according to the time for exposure adjusted, holds The step of going according to the collected optical signals of photosensitive element multiple in imaging sensor, obtaining original image matrix.
In above-mentioned steps 101, multiple sensing elements can be controlled according to the time for exposure of setting acquisition optical signal when It is long, and above-mentioned luminance component matrix can indicate the brightness of optical signal in external environment, therefore terminal gets luminance component square After battle array, the time for exposure can be adjusted according to the luminance component matrix, it is more matched with external environment to be arranged Time for exposure.Wherein, the purpose for being arranged the time for exposure is may finally to make to sample so that the time for exposure is less big also less small The image relative equilibrium arrived.
For this purpose, terminal obtains average luminance component, according to averagely bright according to multiple luminance components in luminance component matrix Component is spent, the time for exposure with average luminance component in inverse relation, multiple senses in subsequent process in imaging sensor are obtained Optical element can be according to the time for exposure got, the multiple photosensitive element of Reverse Turning Control adopting to the optical signal in local environment Collect duration.
The image information as acquired in photosensitive element has certain limitation, less than 0 and cannot cannot exceed maximum threshold After image information exceeds the max-thresholds spillover can occur for value.For this purpose, the embodiment of the present invention is according to the exposure got Reverse Turning Control photosensitive element can control range belonging to image information, make original graph to the acquisition duration of optical signal between light time Each of picture matrix image information is close to 0 without less than 0, maximum is avoided the occurrence of without departing from above-mentioned max-thresholds Spillover.
Wherein, it when obtaining average luminance component, can average to multiple elements of each column in luminance component matrix The column vector being made of the average value of each column is obtained later, and multiple elements in the column vector are averaged to obtain average brightness Component.
In a kind of possible implementation, terminal can use following formula, calculate average luminance component, obtain Time for exposure:T=ax2+ bx+c, wherein t indicates the time for exposure, and x indicates that average luminance component, a, b and c indicate coefficient, and a Less than 0.
In the related technology, it when the case where rapidly changing in external environment there are brightness locating for the imaging sensor, can lead Cause regional area excessively bright, and another regional area of surrounding is excessively dark, and the image of output is caused to be asked in the presence of part is excessive lightness or darkness Topic, has occurred spillover, causes the data details beyond normal range (NR) to be submerged, can not embody in the picture.
Method provided in an embodiment of the present invention is obtained bright by obtaining original image matrix according to the original image matrix Component Matrices are spent, and according to the luminance component matrix and pre-set first convolution kernel, acquisition is matched with original image matrix The second convolution kernel, process of convolution is carried out based on second convolution verification original image matrix, according to treated image array Generate image so that the signal detail ingredient in original image matrix enhance, effectively improve in image exist it is locally excessively bright or Dark problem is crossed, the quality of the image of generation is improved, is conducive to be further processed image.
Fig. 4 is a kind of structural schematic diagram of video generation device provided in an embodiment of the present invention.Referring to fig. 4, the device packet It includes:
Original acquisition module 401 is acquired for executing in above-described embodiment according to photosensitive elements multiple in imaging sensor The step of optical signal arrived, acquisition original image matrix;
Luminance acquisition module 402 obtains luminance component matrix according to original image matrix for executing in above-described embodiment The step of;
Convolution kernel obtains module 403, for executing in above-described embodiment according to luminance component matrix and pre-set the One convolution kernel, the step of acquisition with original image matrix matched second convolution kernel;
Image generation module 404 carries out original image matrix for executing in above-described embodiment according to the second convolution kernel Process of convolution, the step of image is generated according to treated image array.
Optionally, luminance acquisition module 402, including:
First luminance obtaining unit obtains the first luminance component according to original image matrix for executing in above-described embodiment The step of matrix;
Second luminance obtaining unit, for executing according to pre-set third convolution kernel in above-described embodiment, to first The step of luminance component matrix carries out process of convolution, obtains the second luminance component matrix.
Optionally, luminance acquisition module 402, including:
Space conversion unit, for executing each image information in original image matrix in above-described embodiment by RGB The step of space is converted to yuv space, and the luminance component that each image information in original image matrix includes is obtained;
Component units, for execute in above-described embodiment according to each image information in original image matrix include it is bright The step of spending component, constituting luminance component matrix.
Optionally, convolution kernel obtains module 403, including:
Scaled matrix acquiring unit calls default mapping function for executing, to luminance component matrix in above-described embodiment The step of being handled, obtaining scaled matrix corresponding with luminance component matrix;
Convolution kernel acquiring unit zooms in and out the first convolution kernel for executing in above-described embodiment according to scaled matrix The step of handling, obtaining the second convolution kernel.
Optionally, device further includes:
Average luminance component obtains module, for executing in above-described embodiment according to multiple brightness in luminance component matrix The step of component, acquisition average luminance component;
Time for exposure obtains module, for executing in above-described embodiment according to average luminance component, acquisition and average brightness The step of component is in the time for exposure of inverse relation.
It should be noted that:Video generation device provided by the above embodiment is when generating image, only with above-mentioned each function The division progress of module can according to need and for example, in practical application by above-mentioned function distribution by different function moulds Block is completed, i.e., the internal structure of terminal is divided into different functional modules, to complete all or part of function described above Energy.In addition, video generation device provided by the above embodiment and image generating method embodiment belong to same design, it is specific real Existing process is detailed in embodiment of the method, and which is not described herein again.
Fig. 5 shows the structural block diagram of the terminal 500 of an illustrative embodiment of the invention offer.The terminal 500 can be with It is portable mobile termianl, such as:Smart phone, tablet computer, MP3 player (Moving Picture Experts Group Audio Layer III, dynamic image expert's compression standard audio level 3), MP4 (Moving Picture Experts Group Audio Layer IV, dynamic image expert's compression standard audio level 4) player, laptop, Desktop computer, headset equipment or any other intelligent terminal.Terminal 500 is also possible to referred to as user equipment, portable terminal Other titles such as end, laptop terminal, terminal console.
In general, terminal 500 includes:Processor 501 and memory 502.
Processor 501 may include one or more processing cores, such as 4 core processors, 8 core processors etc..Place Reason device 501 can use DSP (Digital Signal Processing, Digital Signal Processing), FPGA (Field- Programmable Gate Array, field programmable gate array), PLA (Programmable Logic Array, may be programmed Logic array) at least one of example, in hardware realize.Processor 501 also may include primary processor and coprocessor, master Processor is the processor for being handled data in the awake state, also referred to as CPU (Central Processing Unit, central processing unit);Coprocessor is the low power processor for being handled data in the standby state.? In some embodiments, processor 501 can be integrated with GPU (Graphics Processing Unit, image processor), GPU is used to be responsible for the rendering and drafting of content to be shown needed for display screen.In some embodiments, processor 501 can also be wrapped AI (Artificial Intelligence, artificial intelligence) processor is included, the AI processor is for handling related machine learning Calculating operation.
Memory 502 may include one or more computer readable storage mediums, which can To be non-transient.Memory 502 may also include high-speed random access memory and nonvolatile memory, such as one Or multiple disk storage equipments, flash memory device.In some embodiments, the non-transient computer in memory 502 can Storage medium is read for storing at least one instruction, at least one instruction by processor 501 for being had to realize this Shen Please in embodiment of the method provide behavior vector generation method.
In some embodiments, terminal 500 is also optional includes:Peripheral device interface 503 and at least one peripheral equipment. It can be connected by bus or signal wire between processor 501, memory 502 and peripheral device interface 503.Each peripheral equipment It can be connected by bus, signal wire or circuit board with peripheral device interface 503.Specifically, peripheral equipment includes:Radio circuit 504, at least one of touch display screen 505, camera 506, voicefrequency circuit 507, positioning component 508 and power supply 509.
Peripheral device interface 503 can be used for I/O (Input/Output, input/output) is relevant outside at least one Peripheral equipment is connected to processor 501 and memory 502.In some embodiments, processor 501, memory 502 and peripheral equipment Interface 503 is integrated on same chip or circuit board;In some other embodiments, processor 501, memory 502 and outer Any one or two in peripheral equipment interface 503 can realize on individual chip or circuit board, the present embodiment to this not It is limited.
Radio circuit 504 is for receiving and emitting RF (Radio Frequency, radio frequency) signal, also referred to as electromagnetic signal.It penetrates Frequency circuit 504 is communicated by electromagnetic signal with communication network and other communication equipments.Radio circuit 504 turns electric signal It is changed to electromagnetic signal to be sent, alternatively, the electromagnetic signal received is converted to electric signal.Optionally, radio circuit 504 wraps It includes:Antenna system, RF transceiver, one or more amplifiers, tuner, oscillator, digital signal processor, codec chip Group, user identity module card etc..Radio circuit 504 can be carried out by least one wireless communication protocol with other terminals Communication.The wireless communication protocol includes but is not limited to:Metropolitan Area Network (MAN), each third generation mobile communication network (2G, 3G, 4G and 8G), wireless office Domain net and/or WiFi (Wireless Fidelity, Wireless Fidelity) network.In some embodiments, radio circuit 504 may be used also To include the related circuit of NFC (Near Field Communication, wireless near field communication), the application is not subject to this It limits.
Display screen 505 is for showing UI (User Interface, user interface).The UI may include figure, text, figure Mark, video and its their any combination.When display screen 505 is touch display screen, display screen 505 also there is acquisition to show The ability of the touch signal on the surface or surface of screen 505.The touch signal can be used as control signal and be input to processor 501 are handled.At this point, display screen 505 can be also used for providing virtual push button and/or dummy keyboard, also referred to as soft button and/or Soft keyboard.In some embodiments, display screen 505 can be one, and the front panel of terminal 500 is arranged;In other embodiments In, display screen 505 can be at least two, be separately positioned on the different surfaces of terminal 500 or in foldover design;In still other reality It applies in example, display screen 505 can be flexible display screen, be arranged on the curved surface of terminal 500 or on fold plane.Even, it shows Display screen 505 can also be arranged to non-rectangle irregular figure, namely abnormity screen.Display screen 505 can use LCD (Liquid Crystal Display, liquid crystal display), OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) Etc. materials preparation.
CCD camera assembly 506 is for acquiring image or video.Optionally, CCD camera assembly 506 include front camera and Rear camera.In general, the front panel of terminal is arranged in front camera, the back side of terminal is arranged in rear camera.One In a little embodiments, rear camera at least two is main camera, depth of field camera, wide-angle camera, focal length camera shooting respectively Any one in head, to realize that main camera and the fusion of depth of field camera realize background blurring function, main camera and wide-angle Camera fusion realizes that pan-shot and VR (Virtual Reality, virtual reality) shooting function or other fusions are clapped Camera shooting function.In some embodiments, CCD camera assembly 506 can also include flash lamp.Flash lamp can be monochromatic warm flash lamp, It is also possible to double-colored temperature flash lamp.Double-colored temperature flash lamp refers to the combination of warm light flash lamp and cold light flash lamp, can be used for not With the light compensation under colour temperature.
Voicefrequency circuit 507 may include microphone and loudspeaker.Microphone is used to acquire the sound wave of user and environment, and will Sound wave, which is converted to electric signal and is input to processor 501, to be handled, or is input to radio circuit 504 to realize voice communication. For stereo acquisition or the purpose of noise reduction, microphone can be separately positioned on the different parts of terminal 500 to be multiple.Mike Wind can also be array microphone or omnidirectional's acquisition type microphone.Loudspeaker is then used to that processor 501 or radio circuit will to be come from 504 electric signal is converted to sound wave.Loudspeaker can be traditional wafer speaker, be also possible to piezoelectric ceramic loudspeaker.When When loudspeaker is piezoelectric ceramic loudspeaker, the audible sound wave of the mankind can be not only converted electrical signals to, it can also be by telecommunications Number the sound wave that the mankind do not hear is converted to carry out the purposes such as ranging.In some embodiments, voicefrequency circuit 507 can also include Earphone jack.
Positioning component 508 is used for the current geographic position of positioning terminal 500, to realize navigation or LBS (Location Based Service, location based service).Positioning component 508 can be the GPS (Global based on the U.S. Positioning System, global positioning system), the dipper system of China, Russia Gray receive this system or European Union The positioning component of Galileo system.
Power supply 509 is used to be powered for the various components in terminal 500.Power supply 509 can be alternating current, direct current, Disposable battery or rechargeable battery.When power supply 509 includes rechargeable battery, which can support wired charging Or wireless charging.The rechargeable battery can be also used for supporting fast charge technology.
In some embodiments, terminal 500 further includes having one or more sensors 510.The one or more sensors 510 include but is not limited to:Acceleration transducer 511, gyro sensor 512, pressure sensor 513, fingerprint sensor 514, Optical sensor 515 and proximity sensor 516.
The acceleration that acceleration transducer 511 can detecte in three reference axis of the coordinate system established with terminal 500 is big It is small.For example, acceleration transducer 511 can be used for detecting component of the acceleration of gravity in three reference axis.Processor 501 can With the acceleration of gravity signal acquired according to acceleration transducer 511, touch display screen 505 is controlled with transverse views or longitudinal view Figure carries out the display of user interface.Acceleration transducer 511 can be also used for the acquisition of game or the exercise data of user.
Gyro sensor 512 can detecte body direction and the rotational angle of terminal 500, and gyro sensor 512 can To cooperate with acquisition user to act the 3D of terminal 500 with acceleration transducer 511.Processor 501 is according to gyro sensor 512 Following function may be implemented in the data of acquisition:When action induction (for example changing UI according to the tilt operation of user), shooting Image stabilization, game control and inertial navigation.
The lower layer of side frame and/or touch display screen 505 in terminal 500 can be set in pressure sensor 513.Work as pressure When the side frame of terminal 500 is arranged in sensor 513, user can detecte to the gripping signal of terminal 500, by processor 501 Right-hand man's identification or prompt operation are carried out according to the gripping signal that pressure sensor 513 acquires.When the setting of pressure sensor 513 exists When the lower layer of touch display screen 505, the pressure operation of touch display screen 505 is realized to UI circle according to user by processor 501 Operability control on face is controlled.Operability control includes button control, scroll bar control, icon control, menu At least one of control.
Fingerprint sensor 514 is used to acquire the fingerprint of user, collected according to fingerprint sensor 514 by processor 501 The identity of fingerprint recognition user, alternatively, by fingerprint sensor 514 according to the identity of collected fingerprint recognition user.It is identifying When the identity of user is trusted identity out, authorize the user that there is relevant sensitive operation, the sensitive operation packet by processor 501 Include solution lock screen, check encryption information, downloading software, payment and change setting etc..Terminal can be set in fingerprint sensor 514 500 front, the back side or side.When being provided with physical button or manufacturer Logo in terminal 500, fingerprint sensor 514 can be with It is integrated with physical button or manufacturer's mark.
Optical sensor 515 is for acquiring ambient light intensity.In one embodiment, processor 501 can be according to optics The ambient light intensity that sensor 515 acquires controls the display brightness of touch display screen 505.Specifically, when ambient light intensity is higher When, the display brightness of touch display screen 505 is turned up;When ambient light intensity is lower, the display for turning down touch display screen 505 is bright Degree.In another embodiment, the ambient light intensity that processor 501 can also be acquired according to optical sensor 515, dynamic adjust The acquisition parameters of CCD camera assembly 506.
Proximity sensor 516, also referred to as range sensor are generally arranged at the front panel of terminal 500.Proximity sensor 516 For acquiring the distance between the front of user Yu terminal 500.In one embodiment, when proximity sensor 516 detects use When family and the distance between the front of terminal 500 gradually become smaller, touch display screen 505 is controlled from bright screen state by processor 501 It is switched to breath screen state;When proximity sensor 516 detects user and the distance between the front of terminal 500 becomes larger, Touch display screen 505 is controlled by processor 501 and is switched to bright screen state from breath screen state.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal 500 of structure shown in Fig. 5, can wrap It includes than illustrating more or fewer components, perhaps combine certain components or is arranged using different components.
The embodiment of the invention also provides a kind of for generating the terminal of image, which includes processor and memory, At least one instruction, at least one section of program, code set or instruction set, instruction, program, code set or instruction are stored in memory Collection is loaded by processor and is had possessed operation in the image generating method to realize above-described embodiment.
The embodiment of the invention also provides a kind of computer readable storage medium, stored in the computer readable storage medium Have at least one instruction, at least one section of program, code set or instruction set, the instruction, the program, the code set or the instruction set by Processor loads and has possessed operation in the image generating method to realize above-described embodiment.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely the preferred embodiments of the embodiment of the present invention, are not intended to limit the invention embodiment, all at this Within the spirit and principle of inventive embodiments, any modification, equivalent replacement, improvement and so on be should be included in of the invention Within protection scope.

Claims (12)

1. a kind of image generating method, which is characterized in that the method includes:
According to the collected optical signals of photosensitive element multiple in imaging sensor, original image matrix, the original image are obtained Matrix includes the image information of the multiple photosensitive element output;
Luminance component matrix is obtained according to the original image matrix, the luminance component matrix is for indicating the multiple photosensitive The luminance component that the image information of element output includes;
According to the luminance component matrix and pre-set first convolution kernel, obtain and the original image matrix matched the Two convolution kernels;
According to second convolution kernel, process of convolution is carried out to the original image matrix, image array is raw according to treated At image.
2. the method according to claim 1, wherein described obtain luminance component according to the original image matrix Matrix, including:
The first luminance component matrix is obtained according to the original image matrix, the first luminance component matrix includes the multiple The luminance component that the image information of photosensitive element output includes;
According to pre-set third convolution kernel, process of convolution is carried out to the first luminance component matrix, obtains the second brightness Component Matrices.
3. the method according to claim 1, wherein described obtain luminance component according to the original image matrix Matrix, including:
Each image information in the original image matrix is converted by rgb space to yuv space, the original image is obtained The luminance component that each image information in matrix includes;
According to the luminance component that each image information in the original image matrix includes, the luminance component matrix is constituted.
4. the method according to claim 1, wherein described according to the luminance component matrix and pre-set First convolution kernel, acquisition include with matched second convolution kernel of the original image matrix:
Default mapping function is called, the luminance component matrix is handled, is obtained corresponding with the luminance component matrix Scaled matrix;
According to the scaled matrix, processing is zoomed in and out to first convolution kernel, obtains second convolution kernel.
5. the method according to claim 1, wherein the method also includes:
According to multiple luminance components in the luminance component matrix, average luminance component is obtained;
According to the average luminance component, the time for exposure with the average luminance component in inverse relation is obtained, it is the multiple Photosensitive element is used for according to the time for exposure, the duration of control acquisition optical signal.
6. a kind of video generation device, which is characterized in that described device includes:
Original acquisition module, for obtaining original image according to the collected optical signals of photosensitive element multiple in imaging sensor Matrix, the original image matrix include the image information of the multiple photosensitive element output;
Luminance acquisition module, for obtaining luminance component matrix according to the original image matrix, the luminance component matrix is used In the luminance component for indicating that the image information of the multiple photosensitive element output includes;
Convolution kernel obtains module, for according to the luminance component matrix and pre-set first convolution kernel, obtain with it is described Matched second convolution kernel of original image matrix;
Image generation module, for process of convolution being carried out to the original image matrix, according to place according to second convolution kernel Image array after reason generates image.
7. device according to claim 6, which is characterized in that the luminance acquisition module, including:
First luminance obtaining unit, for obtaining the first luminance component matrix according to the original image matrix, described first is bright Degree Component Matrices include the luminance component that the image information of the multiple photosensitive element output includes;
Second luminance obtaining unit, for being carried out to the first luminance component matrix according to pre-set third convolution kernel Process of convolution obtains the second luminance component matrix.
8. device according to claim 6, which is characterized in that the luminance acquisition module, including:
Space conversion unit, for being converted each image information in the original image matrix by rgb space to YUV sky Between, obtain the luminance component that each image information in the original image matrix includes;
Component units, the luminance component for including according to each image information in the original image matrix, described in composition Luminance component matrix.
9. device according to claim 6, which is characterized in that the convolution kernel obtains module, including:
Scaled matrix acquiring unit is handled the luminance component matrix for calling default mapping function, is obtained and institute State the corresponding scaled matrix of luminance component matrix;
Convolution kernel acquiring unit obtains described for zooming in and out processing to first convolution kernel according to the scaled matrix Second convolution kernel.
10. device according to claim 6, which is characterized in that described device further includes:
Average luminance component obtains module, for obtaining average bright according to multiple luminance components in the luminance component matrix Spend component;
Time for exposure obtains module, for obtaining and closing with the average luminance component in inverse ratio according to the average luminance component The time for exposure of system, the multiple photosensitive element are used for according to the time for exposure, the duration of control acquisition optical signal.
11. a kind of for generating the terminal of image, which is characterized in that the terminal includes processor and memory, the storage At least one instruction, at least one section of program, code set or instruction set, described instruction, described program, the code are stored in device Collection or described instruction collection are loaded by the processor and are executed to realize figure according to any one of claims 1 to 5 As operation performed in generation method.
12. a kind of computer readable storage medium, which is characterized in that be stored at least one in the computer readable storage medium Item instruction, at least one section of program, code set or instruction set, described instruction, described program, the code set or described instruction collection by Processor loads and executes performed to realize in image generating method according to any one of claims 1 to 5 Operation.
CN201810790667.4A 2018-07-18 2018-07-18 Image generation method, device, terminal and storage medium Active CN108881739B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810790667.4A CN108881739B (en) 2018-07-18 2018-07-18 Image generation method, device, terminal and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810790667.4A CN108881739B (en) 2018-07-18 2018-07-18 Image generation method, device, terminal and storage medium

Publications (2)

Publication Number Publication Date
CN108881739A true CN108881739A (en) 2018-11-23
CN108881739B CN108881739B (en) 2020-01-10

Family

ID=64302921

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810790667.4A Active CN108881739B (en) 2018-07-18 2018-07-18 Image generation method, device, terminal and storage medium

Country Status (1)

Country Link
CN (1) CN108881739B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111583104A (en) * 2020-05-14 2020-08-25 展讯通信(上海)有限公司 Light spot blurring method and device, storage medium and computer equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130170698A1 (en) * 2011-12-30 2013-07-04 Honeywell International Inc. Image acquisition systems
CN105070247A (en) * 2015-07-29 2015-11-18 信利(惠州)智能显示有限公司 Method for determining nonuniform-brightness pixel points in display screen
CN106709890A (en) * 2017-01-18 2017-05-24 聚龙智瞳科技有限公司 Method and device for processing low-light video image
CN108259997A (en) * 2018-04-02 2018-07-06 腾讯科技(深圳)有限公司 Image correlation process method and device, intelligent terminal, server, storage medium
CN108268931A (en) * 2016-12-30 2018-07-10 华为技术有限公司 The methods, devices and systems of data processing

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130170698A1 (en) * 2011-12-30 2013-07-04 Honeywell International Inc. Image acquisition systems
CN105070247A (en) * 2015-07-29 2015-11-18 信利(惠州)智能显示有限公司 Method for determining nonuniform-brightness pixel points in display screen
CN108268931A (en) * 2016-12-30 2018-07-10 华为技术有限公司 The methods, devices and systems of data processing
CN106709890A (en) * 2017-01-18 2017-05-24 聚龙智瞳科技有限公司 Method and device for processing low-light video image
CN108259997A (en) * 2018-04-02 2018-07-06 腾讯科技(深圳)有限公司 Image correlation process method and device, intelligent terminal, server, storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111583104A (en) * 2020-05-14 2020-08-25 展讯通信(上海)有限公司 Light spot blurring method and device, storage medium and computer equipment
CN111583104B (en) * 2020-05-14 2022-08-19 展讯通信(上海)有限公司 Light spot blurring method and device, storage medium and computer equipment

Also Published As

Publication number Publication date
CN108881739B (en) 2020-01-10

Similar Documents

Publication Publication Date Title
CN107945163B (en) Image enhancement method and device
CN109978936B (en) Disparity map acquisition method and device, storage medium and equipment
CN109829456A (en) Image-recognizing method, device and terminal
CN113205568B (en) Image processing method, device, electronic equipment and storage medium
CN108305236A (en) Image enhancement processing method and device
CN108710525A (en) Map methods of exhibiting, device, equipment and storage medium in virtual scene
CN109558837B (en) Face key point detection method, device and storage medium
CN109285178A (en) Image partition method, device and storage medium
CN109977775A (en) Critical point detection method, apparatus, equipment and readable storage medium storing program for executing
CN109803165A (en) Method, apparatus, terminal and the storage medium of video processing
CN109829864A (en) Image processing method, device, equipment and storage medium
CN110022489A (en) Video broadcasting method, device and storage medium
CN109325924B (en) Image processing method, device, terminal and storage medium
CN110163160A (en) Face identification method, device, equipment and storage medium
CN109840584A (en) Convolutional neural networks model, data processing method and device
CN109886208A (en) Method, apparatus, computer equipment and the storage medium of object detection
CN112614500A (en) Echo cancellation method, device, equipment and computer storage medium
CN109634688A (en) Display methods, device, terminal and the storage medium at session interface
CN108734662A (en) The method and apparatus for showing icon
CN110189348A (en) Head portrait processing method, device, computer equipment and storage medium
CN108881739A (en) Image generating method, device, terminal and storage medium
CN110163862A (en) Image, semantic dividing method, device and computer equipment
CN110163615A (en) Method, apparatus, equipment and the storage medium of brush face payment
CN109872294A (en) Image processing method, device, terminal and storage medium
CN109345636A (en) The method and apparatus for obtaining conjecture face figure

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20230707

Address after: 518057 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 floors

Patentee after: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

Patentee after: TENCENT CLOUD COMPUTING (BEIJING) Co.,Ltd.

Address before: 518057 Tencent Building, No. 1 High-tech Zone, Nanshan District, Shenzhen City, Guangdong Province, 35 floors

Patentee before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

TR01 Transfer of patent right