CN109474784A - A kind of preview image processing method and terminal device - Google Patents

A kind of preview image processing method and terminal device Download PDF

Info

Publication number
CN109474784A
CN109474784A CN201811393220.XA CN201811393220A CN109474784A CN 109474784 A CN109474784 A CN 109474784A CN 201811393220 A CN201811393220 A CN 201811393220A CN 109474784 A CN109474784 A CN 109474784A
Authority
CN
China
Prior art keywords
image
thread
sample rate
processing result
frame
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
CN201811393220.XA
Other languages
Chinese (zh)
Other versions
CN109474784B (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201811393220.XA priority Critical patent/CN109474784B/en
Publication of CN109474784A publication Critical patent/CN109474784A/en
Application granted granted Critical
Publication of CN109474784B publication Critical patent/CN109474784B/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/80Camera processing pipelines; Components thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N23/00Cameras or camera modules comprising electronic image sensors; Control thereof
    • H04N23/60Control of cameras or camera modules
    • H04N23/67Focus control based on electronic image sensor signals
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/646Circuits for processing colour signals for image enhancement, e.g. vertical detail restoration, cross-colour elimination, contour correction, chrominance trapping filters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N9/00Details of colour television systems
    • H04N9/64Circuits for processing colour signals
    • H04N9/73Colour balance circuits, e.g. white balance circuits or colour temperature control

Abstract

The embodiment of the invention discloses a kind of preview image processing method and terminal device, the side is applied to terminal device, wherein the method includes creating first thread and the second thread under the initialized state of camera system in terminal device;Control first thread carries out image procossing to every frame image that camera acquires according to the first sample rate;The second thread of parallel control carries out image procossing to every N frame image that camera acquires according to the second sample rate, and generates processing result image calibration curve;In the case where the present frame preview image of acquisition is an integer extraordinarily frame image of N, it is based on processing result image calibration curve, the processing result image that first thread obtains is modified, exports target image.The preview image processing method provided through the invention, when handling preview image while optimizing image effect, additionally it is possible to take into account image sampling rate and terminal device power consumption.

Description

A kind of preview image processing method and terminal device
Technical field
The present embodiments relate to field of communication technology more particularly to a kind of preview image processing method and terminal devices.
Background technique
With the continuous upgrading that terminal device camera configures, ISP (Image Signal Processor, image processing Device) technology is more and more mature, it is become better and better by the effect of taking pictures that ISP obtain after 3A processing.The following user couple The requirement of terminal device shooting effect is also higher and higher.
When the ISP of mobile terminal carries out 3A processing to preview image, the statistic sampling data volume of every frame preview image is got over I.e. sample rate is bigger greatly, then the processing result obtained is more accurate, and the display effect of the preview image of camera is better, closer true It is real.But sample rate is higher, and data volume to be processed needed for ISP can be bigger, and ISP power consumption can corresponding cumulative rises.As it can be seen that existing ISP to preview image carry out 3A processing when, cannot be considered in terms of image sampling rate and terminal device power consumption.
Summary of the invention
The embodiment of the present invention provides a kind of preview image processing method, to solve existing ISP existing in the prior art When carrying out 3A processing to preview image, the problem of image sampling rate is with terminal device power consumption cannot be considered in terms of.
In order to solve the above-mentioned technical problem, the present invention is implemented as follows:
In a first aspect, being applied to terminal device, the side the embodiment of the invention provides a kind of preview image processing method Method includes: to create first thread and the second thread under the initialized state of camera system of the terminal device;Control institute It states first thread and image procossing is carried out to every frame image that camera acquires according to the first sample rate;Second line described in parallel control Journey carries out image procossing to every N frame image that camera acquires according to the second sample rate, and it is bent to generate processing result image calibration Line;In the case where the present frame preview image of acquisition is an integer extraordinarily frame image of N, it is based on described image processing result Calibration curve, the processing result image obtained to the first thread are modified, and export target image;Wherein, described first Thread and second thread parallel operation, first sample rate are lower than second sample rate.
Second aspect, the embodiment of the invention provides a kind of terminal devices, wherein the terminal device includes: creation mould Block, for creating first thread and the second thread under the initialized state of camera system in the terminal device;First control Molding block carries out image procossing to every frame image that camera acquires according to the first sample rate for controlling the first thread; Second control module, every N frame image camera acquired according to the second sample rate for the second thread described in parallel control into Row image procossing, and generate processing result image calibration curve;Correction module is for the present frame preview image in acquisition In the case where the integer of a N extraordinarily frame image, it is based on described image processing result calibration curve, the first thread is obtained Processing result image is modified, and exports target image;Wherein, the first thread and second thread parallel operation, institute The first sample rate is stated lower than second sample rate.
The third aspect the embodiment of the invention provides a kind of terminal device, including processor, memory and is stored in described It is real when the computer program is executed by the processor on memory and the computer program that can run on the processor The step of any preview image processing method described in the existing embodiment of the present invention.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage medium, the computer-readable storage Computer program is stored on medium, and any described in the embodiment of the present invention is realized when the computer program is executed by processor The step of kind preview image processing method.
In embodiments of the present invention, by creating First Line under the initialized state of camera system in terminal device Journey and the second thread;Control first thread carries out image procossing to every frame image that camera acquires according to the first sample rate;And Row the second thread of control carries out image procossing to every N frame image that camera acquires according to the second sample rate, and generates at image Manage result calibration curve;In the case where the present frame preview image of acquisition is an integer extraordinarily frame image of N, it is based on image Processing result calibration curve is modified the processing result image that first thread obtains, and exports target image.This method can lead to It crosses after the image that the first sample rate acquires camera handles, based on processing result image calibration curve come to the whole of N Several times add the processing result of a frame image to be modified, to optimize the display effect of preview image, this method is without passing through increasing Add image sampling rate to optimize the display effect of preview image, therefore image sampling rate and terminal device power consumption can be taken into account.
Detailed description of the invention
Fig. 1 is one of the flow chart of the preview image processing method provided according to embodiments of the present invention;
Fig. 2 is the two of the flow chart of the preview image processing method provided according to embodiments of the present invention;
Fig. 3 is the three of the flow chart of the preview image processing method provided according to embodiments of the present invention;
Fig. 4 is the structural block diagram of the terminal device of the embodiment of the present invention;
Fig. 5 is the hardware structural diagram of the terminal device provided according to embodiments of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall within the protection scope of the present invention.
Referring to Fig.1, one of the flow chart of preview image processing method provided in an embodiment of the present invention is shown.
The preview image processing method of the embodiment of the present invention the following steps are included:
Step 101: under the initialized state of camera system of terminal device, creating first thread and the second thread.
The preview image processing method of example of the embodiment of the present invention, be it is a kind of it is balanced to preview image carry out low sampling rate system and The multithreading statistical method of high sampling rate statistics, the preview image processing method in the embodiment of the present invention can be by terminal device ISP is executed.Wherein, first thread and the second thread parallel operation, first thread, the second thread by terminal device server Control operation.
Step 102: control first thread carries out image procossing to every frame image that camera acquires according to the first sample rate.
First sample rate is lower than the second sample rate, can be by ability for the specific value of the first sample rate, the second sample rate Field technique personnel are configured according to actual needs, are not particularly limited in the embodiment of the present invention to this, and the first sample rate can be with It is set as 1/4 full width, the second sample rate can be set to 1/2 full width or full width.
When being handled using the first sample rate image, first image 3A can be counted using the first sample rate, then 3A algorithm process is carried out to the result after 3A statistics.It, can also be only with when being handled using the first sample rate image First sample rate counts image 3A.First thread is different to the pre-processing of image, correspondingly calibrates subsequently through result Curve is also different to the amendment process of processing result image.
Step 103: the second thread of parallel control carries out image to every N frame image that camera acquires according to the second sample rate Processing, and generate processing result image calibration curve.
Second thread carries out image procossing to every N frame image according to the second sample rate, after handling each frame image A reference point is obtained, generates processing result image calibration curve according to each reference point.
Step 104: in the case where the present frame preview image of acquisition is an integer extraordinarily frame image of N, based on figure As processing result calibration curve, the processing result image that first thread obtains is modified, exports target image.
As described above, first thread is different to the pre-processing of image, correspondingly subsequently through result calibration curve pair The amendment process of processing result image is also different.Specifically, if first thread includes adopting using first to the pre-processing of image Sample rate to image 3A count, then to 3A statistics after result carry out 3A algorithm process, then in this step first thread to acquisition The 3A algorithm process result of an integer extraordinarily frame image of N be modified.If first thread to the early period of image at Reason is to count only with the first sample rate to image 3A, then an integer extraordinarily frame of the first thread to the N of acquisition in this step The 3A statistical result of image is modified, and then carries out 3A algorithm process to revised 3A statistical result.
Preview image processing method provided in an embodiment of the present invention, it is initialized by the camera system in terminal device Under state, first thread and the second thread are created;Every frame figure that control first thread acquires camera according to the first sample rate As carrying out image procossing;The second thread of parallel control carries out image to every N frame image that camera acquires according to the second sample rate Processing, and generate processing result image calibration curve;The integer extraordinarily frame image for being N in the present frame preview image of acquisition In the case where, it is based on processing result image calibration curve, the processing result image that first thread obtains is modified, exports mesh Logo image.After this method can be handled by the image that the first sample rate acquires camera, it is based on processing result image school Directrix curve is modified come the processing result of the extraordinarily frame image of the integer to N, thus optimize the display effect of preview image, This method is not necessarily to optimize the display effect of preview image by increasing image sampling rate, therefore can take into account image sampling rate and end End equipment power consumption.
Referring to Fig. 2, the two of the flow chart of preview image processing method provided in an embodiment of the present invention are shown.
Preview image processing method in the embodiment of the present invention specifically includes the following steps:
Step 201: under the initialized state of camera system of terminal device, creating first thread and the second thread.
Wherein, first thread and the operation of the second thread parallel.
Step 202: control first thread carries out camera preview image collected according to the first sample rate preset First image procossing obtains preset quantity statistical picture block.
It is illustrated so that the first sample rate is 1/4 full width as an example in the embodiment of the present invention.First thread adopts camera Each frame image of collection carries out 3A statistics according to the sample rate of 1/4 full width, obtains the statistical picture block of 64*48 block.
3A technology, that is, auto-focusing, automatic exposure and automatic white balance.Auto-focusing algorithm, automatic exposure is utilized in 3A technology Light algorithm and automatic white balance algorithm realize that picture contrast is maximum, improve the overexposure of main body subject or under-exposed feelings Condition compensates color difference of the picture under the irradiation of different light, so that the image information compared with high image quality be presented.For to preview Image carries out 3A and counts to obtain the specific processing mode of each statistical picture block, referring to the relevant technologies, in the embodiment of the present invention This is not particularly limited.
Step 203: preset second image procossing being carried out to each statistical picture block, obtains processing result image.
To each image statistics block carry out preset second image procossing when, can by auto-focusing, automatic exposure with And one of any in automatic white balance algorithm is realized.Preset second image procossing is substantially that 3A algorithm is done to image statistics block Processing.The concrete mode that resulting image statistics block does 3A processing is counted for the 3A to a frame image, is referring to the relevant technologies Can, this is not particularly limited in the embodiment of the present invention.
If the frame preview image is an integer extraordinarily frame image of N, subsequent the second thread of reference image generated Processing result calibration curve to after preset second image procossing acquired processing result image be modified.If the frame is pre- Image of looking at not is an integer extraordinarily frame image of N, then without executing amendment step shown in step 205.
Step 204: the second thread of parallel control unites to every N frame image that camera acquires according to the second sample rate Meter, obtains statistical result.
Wherein, the first sample rate is lower than the second sample rate, and the second sample rate can be set to 4 times of the first sample rate.? During specific implementation, it is 1/4 full width that the first sample rate, which can be set, and the second sample rate is full width.
When counting to every N frame image, the execution of 3A algorithm can be used.By 3A algorithm using the second sample rate to every N frame image is counted, and the corresponding statistical picture block of each nth frame image, the corresponding statistical picture of each nth frame image of gained are obtained Block, that is, statistical result.
Step 205: statistical result being handled, the reference point in processing result image calibration curve is generated.
3A algorithm process can be done to statistical result, generate the ginseng in processing result image calibration curve according to processing result According to point.When doing 3A algorithm process to statistical result, institute's employing mode in step 203 to the corresponding statistical picture block of a frame image The mode for carrying out 3A algorithm process is identical, and related place is mutually referring to details are not described herein.
Step 206: according to the reference point generated, generating processing result image calibration curve.
Step 204 to step 206 is the detailed process of the second thread generation processing result image calibration curve, the second thread When generating processing result image calibration curve, the higher 3A algorithm statistical result of an accuracy rate is calculated every N frame, every time As soon as statistical result as a reference point, depicts multiple reference points to obtain a calibration curve i.e. processing result image school Directrix curve is calibrated for the processing result image to first thread, obtains the preview image that display effect more preferably optimizes.
For step 201 to the process flow that step 203 is to image, step 204 to 206 is to generate processing result image calibration The process of curve, during specific implementation, the two concurrent process are executed, and have no sequencing.
Step 207: in the case where the present frame preview image of acquisition is an integer extraordinarily frame image of N, based on figure As processing result calibration curve, the processing result image that first thread obtains is modified, exports target image.
By the modified target image of processing result image calibration curve, shown picture is more life-like.Specific real During now, after having handled a frame preview image and exporting its corresponding target image, judge that the camera system of terminal device is It is no to exit, if not exiting, returns to step 201 pairs of next frame preview images and handle, it is straight to repeat above-mentioned process It is exited to camera system.
Preview image processing method provided in an embodiment of the present invention, by control first thread according to the first sample rate to taking the photograph The every frame image acquired as head carries out preset first image procossing and preset second processing;The second thread of parallel control is pressed Processing result image calibration curve is generated after every N frame image that camera acquires is counted, handled according to the second sample rate;? In the case that the present frame preview image of acquisition is an integer extraordinarily frame image of N, it is based on processing result image calibration curve, The processing result image that first thread obtains is modified, target image is exported.This method can be by the first sample rate to taking the photograph After being handled as the image of head acquisition, based on processing result image calibration curve come the extraordinarily frame image of the integer to N Processing result is modified, to optimize the display effect of preview image, this method is not necessarily to by increasing image sampling rate come excellent Change the display effect of preview image, therefore image sampling rate and terminal device power consumption can be taken into account.
Referring to Fig. 3, the three of the flow chart of preview image processing method provided in an embodiment of the present invention are shown.
Preview image processing method in the embodiment of the present invention specifically includes the following steps:
Step 301: under the initialized state of camera system of terminal device, creating first thread and the second thread.
Wherein, first thread and the operation of the second thread parallel.
Step 302: control first thread carries out camera preview image collected according to the first sample rate preset First image procossing obtains preset quantity statistical picture block.
It is illustrated so that the first sample rate is 1/4 full width as an example in the embodiment of the present invention.First thread adopts camera Each frame image of collection carries out 3A statistics according to the sample rate of 1/4 full width, obtains the statistical picture block of 64*48 block.
If the frame preview image is an integer extraordinarily frame image of N, subsequent the second thread of reference image generated Processing result calibration curve is modified gained statistical picture block.If the frame preview image is not an integer extraordinarily frame of N Image, without handling the corresponding statistical picture block of the frame preview image, but to the corresponding each system of the frame preview image It counts image block and carries out preset second image procossing, obtain output after processing result image treated preview image, In, it, can be using auto-focusing, automatic exposure and automatic white flat when carrying out preset second image procossing to statistical picture block It accounts one of any in method.
Step 303: the second thread of parallel control unites to every N frame image that camera acquires according to the second sample rate Meter generates each reference point in processing result image calibration curve.
Wherein, the first sample rate is lower than the second sample rate, and the second sample rate can be set to 4 times of the first sample rate.? During specific implementation, it is 1/4 full width that the first sample rate, which can be set, and the second sample rate is full width.
When counting to every N frame image, the execution of 3A algorithm can be used.By 3A algorithm using the second sample rate to every N frame image is counted, and the corresponding statistical picture block of each nth frame image, the corresponding statistical picture of each nth frame image of gained are obtained Block, that is, statistical result.
Step 304: according to the reference point generated, generating processing result image calibration curve.
Step 303 to step 304 is the detailed process of the second thread generation processing result image calibration curve, the second thread When generating processing result image calibration curve, the higher 3A algorithm statistical result of an accuracy rate is calculated every N frame, every time As soon as statistical result as a reference point, depicts multiple reference points to obtain a calibration curve i.e. processing result image school Directrix curve is calibrated for the processing result image to first thread, obtains the preview image that display effect more preferably optimizes.
The mode of the generation processing result image calibration curve provided in the embodiment of the present invention, to every N of camera acquisition After frame image is counted, processing result image calibration curve can be generated according to the statistical result of each N frame image, compared to figure The every N frame image acquired to camera is needed to count in embodiment shown in 2, after being handled again statistical result, foundation For the processing result of each N frame image generates the mode of processing result image calibration curve, can save to statistical result again into The operation of row processing can not only shorten the processing time but also can mitigate the processing load of terminal device.
For step 301 to the process flow that step 302 is to image, step 303 to 304 is to generate processing result image calibration The process of curve, during specific implementation, the two concurrent process are executed, and have no sequencing.
Step 305: in the case where the present frame preview image of acquisition is an integer extraordinarily frame image of N, based on figure As processing result calibration curve is modified the corresponding preset quantity statistical picture block of present preview image.
If present frame preview image is an integer extraordinarily frame image of N, it is determined that needs return the frame preview image Return calibration, thus by processing result image calibration curve to each statistical picture block of the corresponding preset quantity of present preview image into Row amendment.
Step 306: preset third image procossing being carried out to revised each statistical picture block, exports target image.
It, can be by auto-focusing, automatic when carrying out preset third image procossing to revised each statistical picture block One of any in exposure and automatic white balance algorithm is realized.Preset third image procossing is substantially to revised each figure As statistics block does 3A algorithm process.The specific side that resulting image statistics block does 3A processing is counted for the 3A to a frame image Formula is not particularly limited this in the embodiment of the present invention referring to the relevant technologies.
The picture that target image generated is shown after the amendment of processing result image calibration curve is more life-like.Having During body is realized, after having handled a frame preview image and exporting its corresponding target image, the camera system of terminal device is judged Whether system exits, if not exiting, returns to step 301 pairs of next frame preview images and handles, repeat above-mentioned stream Cheng Zhizhi camera system exits.
Preview image processing method provided in an embodiment of the present invention, by control first thread according to the first sample rate to taking the photograph The every frame image acquired as head carries out preset first image procossing;The second thread of parallel control is according to the second sample rate to camera shooting Every N frame image of head acquisition carries out image procossing, and generates processing result image calibration curve;In the present frame preview graph of acquisition In the case where as the integer extraordinarily frame image for N, it is based on processing result image calibration curve, the figure obtained to first thread As processing result is modified, target image is exported.This method can carry out the image that camera acquires by the first sample rate After processing, it is modified based on processing result image calibration curve come the processing result of the extraordinarily frame image of the integer to N, from And optimizing the display effect of preview image, the display that this method is not necessarily to optimize by increasing image sampling rate preview image is imitated Fruit, therefore image sampling rate and terminal device power consumption can be taken into account.In addition, generating processing result image school disclosed in this kind of method The mode of directrix curve can not only shorten the processing time but also can mitigate the processing load of terminal device.
Referring to Fig. 4, the structural block diagram of the terminal device of the embodiment of the present invention is shown.Terminal device is able to achieve aforementioned implementation The details of preview image processing method in example, and reach identical effect.
The terminal device of the embodiment of the present invention includes: creation module 401, for the terminal device camera system In the state of initialization, first thread and the second thread are created;First control module 402 is pressed for controlling the first thread Image procossing is carried out to every frame image that camera acquires according to the first sample rate;Second control module 403 is used for parallel control institute It states the second thread and image procossing is carried out to every N frame image that camera acquires according to the second sample rate, and generate image procossing knot Fruit calibration curve;Correction module 404, the feelings for the integer extraordinarily frame image that the present frame preview image in acquisition is N Under condition, it is based on described image processing result calibration curve, the processing result image obtained to the first thread is modified, defeated Target image out;Wherein, the first thread and second thread parallel operation, first sample rate are lower than described second Sample rate;Creation module, the first control module, the second control module and correction module are sequentially connected with.
Preferably, first control module includes: the first processing submodule, for controlling the first thread according to One sample rate carries out preset first image procossing to camera preview image collected, obtains preset quantity statistical picture Block.
Preferably, second control module includes: the first statistic submodule, is pressed for the second thread described in parallel control Every N frame image that camera acquires is counted according to the second sample rate, obtains statistical result;First reference point generates submodule Block generates the reference point in processing result image calibration curve for handling the statistical result;First generates submodule Block, for generating described image processing result calibration curve according to the reference point generated.
Preferably, first control module further include: second processing submodule, in the first processing submodule It controls the first thread and camera preview image collected is handled according to the first sample rate, obtain preset quantity After statistical picture block, preset second image procossing is carried out to each statistical picture block, obtains processing result image.
Preferably, the correction module includes: statistical picture block amendment submodule, for the present frame preview graph in acquisition In the case where as the integer extraordinarily frame image for N, based on described image processing result calibration curve to the current preview The corresponding preset quantity statistical picture block of image is modified;Output sub-module, for revised each statistical chart As block carries out preset third image procossing, output target image.
Preferably, second control module includes: that the second reference point generates submodule, for described in parallel control second Thread counts every N frame image that camera acquires according to the second sample rate, generates in processing result image calibration curve Each reference point;Second generates submodule, for it is bent to generate the calibration of described image processing result according to the reference point generated Line.
Terminal device provided in an embodiment of the present invention can be realized terminal device in the embodiment of the method for Fig. 1 to Fig. 3 and realize Each process, to avoid repeating, which is not described herein again.
Terminal device provided in an embodiment of the present invention, under the initialized state of camera system, creation first thread and Second thread;Control first thread carries out image procossing to every frame image that camera acquires according to the first sample rate;Parallel control It makes the second thread and image procossing is carried out to every N frame image that camera acquires according to the second sample rate, and generate image procossing knot Fruit calibration curve;In the case where the present frame preview image of acquisition is an integer extraordinarily frame image of N, it is based on image procossing As a result calibration curve is modified the processing result image that first thread obtains, and exports target image.The terminal device can lead to It crosses after the image that the first sample rate acquires camera handles, based on processing result image calibration curve come to the whole of N Several times add the processing result of a frame image to be modified, to optimize the display effect of preview image, the terminal device is without logical It crosses and increases image sampling rate to optimize the display effect of preview image, therefore image sampling rate and terminal device power consumption can be taken into account.
Referring to Fig. 5, a kind of hardware structural diagram of terminal device of the embodiment of the present invention is shown.
A kind of hardware structural diagram of Fig. 5 terminal device of each embodiment to realize the present invention, the terminal device 500 Including but not limited to: radio frequency unit 501, audio output unit 503, input unit 504, sensor 505, is shown network module 502 Show the components such as unit 506, user input unit 507, interface unit 508, memory 509, processor 510 and power supply 511. It will be understood by those skilled in the art that terminal device structure shown in Fig. 5 does not constitute the restriction to terminal device, terminal is set Standby may include perhaps combining certain components or different component layouts than illustrating more or fewer components.In the present invention In embodiment, terminal device includes but is not limited to mobile phone, tablet computer, laptop, palm PC, car-mounted terminal, can wear Wear equipment and pedometer etc..
Processor 510, under the initialized state of camera system in the terminal device, creation first thread and Second thread;It controls the first thread and image procossing is carried out to every frame image that camera acquires according to the first sample rate;And Row controls second thread and carries out image procossing to every N frame image that camera acquires according to the second sample rate, and generates figure As processing result calibration curve;In the case where the present frame preview image of acquisition is an integer extraordinarily frame image of N, it is based on Described image processing result calibration curve, the processing result image obtained to the first thread are modified, and export target figure Picture;Wherein, the first thread and second thread parallel operation, first sample rate are lower than second sample rate.
Terminal device provided in an embodiment of the present invention, under the initialized state of camera system, creation first thread and Second thread;Control first thread carries out image procossing to every frame image that camera acquires according to the first sample rate;Parallel control It makes the second thread and image procossing is carried out to every N frame image that camera acquires according to the second sample rate, and generate image procossing knot Fruit calibration curve;In the case where the present frame preview image of acquisition is an integer extraordinarily frame image of N, it is based on image procossing As a result calibration curve is modified the processing result image that first thread obtains, and exports target image.The terminal device can lead to It crosses after the image that the first sample rate acquires camera handles, based on processing result image calibration curve come to the whole of N Several times add the processing result of a frame image to be modified, to optimize the display effect of preview image, the terminal device is without logical It crosses and increases image sampling rate to optimize the display effect of preview image, therefore image sampling rate and terminal device power consumption can be taken into account.
It should be understood that the embodiment of the present invention in, radio frequency unit 501 can be used for receiving and sending messages or communication process in, signal Send and receive, specifically, by from base station downlink data receive after, to processor 510 handle;In addition, by uplink Data are sent to base station.In general, radio frequency unit 501 includes but is not limited to antenna, at least one amplifier, transceiver, coupling Device, low-noise amplifier, duplexer etc..In addition, radio frequency unit 501 can also by wireless communication system and network and other set Standby communication.
Terminal device provides wireless broadband internet by network module 502 for user and accesses, and such as user is helped to receive It sends e-mails, browse webpage and access streaming video etc..
Audio output unit 503 can be received by radio frequency unit 501 or network module 502 or in memory 509 The audio data of storage is converted into audio signal and exports to be sound.Moreover, audio output unit 503 can also provide and end The relevant audio output of specific function that end equipment 500 executes is (for example, call signal receives sound, message sink sound etc. Deng).Audio output unit 503 includes loudspeaker, buzzer and receiver etc..
Input unit 504 is for receiving audio or video signal.Input unit 504 may include graphics processor (Graphics Processing Unit, GPU) 5041 and microphone 5042, graphics processor 5041 is in video acquisition mode Or the image data of the static images or video obtained in image capture mode by image capture apparatus (such as camera) carries out Reason, wherein image capture apparatus includes TOF camera.Treated, and picture frame may be displayed on display unit 506.Through figure Treated that picture frame can store in memory 509 (or other storage mediums) or via radio frequency unit for processor 5041 501 or network module 502 sent.Microphone 5042 can receive sound, and can be sound by such acoustic processing Frequency evidence.Treated, and audio data can be converted in the case where telephone calling model and can be sent via radio frequency unit 501 Format to mobile communication base station exports.
Terminal device 500 further includes at least one sensor 505, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 5061, and proximity sensor can close when terminal device 500 is moved in one's ear Display panel 5061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (general For three axis) size of acceleration, it can detect that size and the direction of gravity when static, can be used to identify terminal device posture (ratio Such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap);It passes Sensor 505 can also include fingerprint sensor, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, wet Meter, thermometer, infrared sensor etc. are spent, details are not described herein.
Display unit 506 is for showing information input by user or being supplied to the information of user.Display unit 506 can wrap Display panel 5061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 5061.
User input unit 507 can be used for receiving the number or character information of input, and generate the use with terminal device Family setting and the related key signals input of function control.Specifically, user input unit 507 include touch panel 5071 and Other input equipments 5072.Touch panel 5071, also referred to as touch screen collect the touch operation of user on it or nearby (for example user uses any suitable objects or attachment such as finger, stylus on touch panel 5071 or in touch panel 5071 Neighbouring operation).Touch panel 5071 may include both touch detecting apparatus and touch controller.Wherein, touch detection Device detects the touch orientation of user, and detects touch operation bring signal, transmits a signal to touch controller;Touch control Device processed receives touch information from touch detecting apparatus, and is converted into contact coordinate, then gives processor 510, receiving area It manages the order that device 510 is sent and is executed.Furthermore, it is possible to more using resistance-type, condenser type, infrared ray and surface acoustic wave etc. Seed type realizes touch panel 5071.In addition to touch panel 5071, user input unit 507 can also include other input equipments 5072.Specifically, other input equipments 5072 can include but is not limited to physical keyboard, function key (such as volume control button, Switch key etc.), trace ball, mouse, operating stick, details are not described herein.
Further, touch panel 5071 can be covered on display panel 5061, when touch panel 5071 is detected at it On or near touch operation after, send processor 510 to determine the type of touch event, be followed by subsequent processing device 510 according to touching The type for touching event provides corresponding visual output on display panel 5061.Although in Fig. 5, touch panel 5071 and display Panel 5061 is the function that outputs and inputs of realizing terminal device as two independent components, but in some embodiments In, can be integrated by touch panel 5071 and display panel 5061 and realize the function that outputs and inputs of terminal device, it is specific this Place is without limitation.
Interface unit 508 is the interface that external device (ED) is connect with terminal device 500.For example, external device (ED) may include having Line or wireless head-band earphone port, external power supply (or battery charger) port, wired or wireless data port, storage card end Mouth, port, the port audio input/output (I/O), video i/o port, earphone end for connecting the device with identification module Mouthful etc..Interface unit 508 can be used for receiving the input (for example, data information, electric power etc.) from external device (ED) and By one or more elements that the input received is transferred in terminal device 500 or can be used in 500 He of terminal device Data are transmitted between external device (ED).
Memory 509 can be used for storing software program and various data.Memory 509 can mainly include storing program area The storage data area and, wherein storing program area can (such as the sound of application program needed for storage program area, at least one function Sound playing function, image player function etc.) etc.;Storage data area can store according to mobile phone use created data (such as Audio data, phone directory etc.) etc..In addition, memory 509 may include high-speed random access memory, it can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 510 is the control centre of terminal device, utilizes each of various interfaces and the entire terminal device of connection A part by running or execute the software program and/or module that are stored in memory 509, and calls and is stored in storage Data in device 509 execute the various functions and processing data of terminal device, to carry out integral monitoring to terminal device.Place Managing device 510 may include one or more processing units;Preferably, processor 510 can integrate application processor and modulatedemodulate is mediated Manage device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is main Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 510.
Terminal device 500 can also include the power supply 511 (such as battery) powered to all parts, it is preferred that power supply 511 Can be logically contiguous by power-supply management system and processor 510, to realize management charging by power-supply management system, put The functions such as electricity and power managed.
In addition, terminal device 500 includes some unshowned functional modules, details are not described herein.
Preferably, the embodiment of the present invention also provides a kind of terminal device, including processor 510, and memory 509 is stored in On memory 509 and the computer program that can run on the processor 510, the computer program are executed by processor 510 Each process of the above-mentioned preview image processing method embodiment of Shi Shixian, and identical technical effect can be reached, to avoid repeating, Which is not described herein again.
The embodiment of the present invention also provides a kind of computer readable storage medium, and meter is stored on computer readable storage medium Calculation machine program, the computer program realize each process of above-mentioned preview image processing method embodiment when being executed by processor, And identical technical effect can be reached, to avoid repeating, which is not described herein again.Wherein, the computer readable storage medium, Such as read-only memory (Read-OnlyMemory, abbreviation ROM), random access memory (Random Access Memory, letter Claim RAM), magnetic or disk etc..
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form belongs within protection of the invention.

Claims (10)

1. a kind of preview image processing method is applied to terminal device, which is characterized in that the described method includes:
Under the initialized state of camera system of the terminal device, first thread and the second thread are created;
It controls the first thread and image procossing is carried out to every frame image that camera acquires according to the first sample rate;
Second thread described in parallel control carries out image procossing to every N frame image that camera acquires according to the second sample rate, and Generate processing result image calibration curve;
In the case where the present frame preview image of acquisition is an integer extraordinarily frame image of N, based on described image processing knot Fruit calibration curve, the processing result image obtained to the first thread are modified, and export target image;
Wherein, the first thread and second thread parallel operation, first sample rate are lower than second sample rate.
2. the method according to claim 1, wherein the control first thread is according to the first sample rate pair Every frame image of camera acquisition carries out image procossing, comprising:
It controls the first thread and preset first image is carried out to camera preview image collected according to the first sample rate Processing, obtains preset quantity statistical picture block.
3. according to the method described in claim 2, it is characterized in that, the second thread described in the parallel control is according to the second sampling Rate carries out image procossing to every N frame image that camera acquires, and generates processing result image calibration curve, comprising:
Second thread described in parallel control counts every N frame image that camera acquires according to the second sample rate, is united Count result;
The statistical result is handled, the reference point in processing result image calibration curve is generated;
According to the reference point generated, described image processing result calibration curve is generated.
4. according to the method described in claim 2, it is characterized in that, in the control first thread according to the first sample rate Camera preview image collected is handled, after obtaining preset quantity statistical picture block, the method also includes:
Preset second image procossing is carried out to each statistical picture block, obtains processing result image.
5. according to the method described in claim 4, it is characterized in that, acquisition present frame preview image be N integral multiple In the case where adding a frame image, it is based on described image processing result calibration curve, the image procossing obtained to the first thread As a result it is modified, exports target image, comprising:
In the case where the present frame preview image of acquisition is an integer extraordinarily frame image of N, based on described image processing knot Fruit calibration curve is modified the corresponding preset quantity statistical picture block of the present preview image;
Preset third image procossing is carried out to revised each statistical picture block, exports target image.
6. according to the method described in claim 5, it is characterized in that, the second thread described in the parallel control is according to the second sampling Rate carries out image procossing to every N frame image that camera acquires, and generates processing result image calibration curve, comprising:
Second thread described in parallel control counts every N frame image that camera acquires according to the second sample rate, generates figure As each reference point in processing result calibration curve;
According to the reference point generated, described image processing result calibration curve is generated.
7. a kind of terminal device, which is characterized in that the terminal device includes:
Creation module, for creating first thread and second under the initialized state of camera system in the terminal device Thread;
First control module carries out every frame image that camera acquires according to the first sample rate for controlling the first thread Image procossing;
Second control module, every N frame figure that camera is acquired according to the second sample rate for the second thread described in parallel control As carrying out image procossing, and generate processing result image calibration curve;
Correction module, for being based on institute in the case where the present frame preview image of acquisition is an integer extraordinarily frame image of N Processing result image calibration curve is stated, the processing result image obtained to the first thread is modified, and exports target image;
Wherein, the first thread and second thread parallel operation, first sample rate are lower than second sample rate.
8. terminal device according to claim 7, which is characterized in that first control module includes:
First processing submodule, for controlling the first thread according to the first sample rate to camera preview image collected Preset first image procossing is carried out, preset quantity statistical picture block is obtained.
9. a kind of terminal device, which is characterized in that including processor, memory and be stored on the memory and can be described The computer program run on processor is realized when the computer program is executed by the processor as in claim 1 to 6 The step of described in any item preview image processing methods.
10. a kind of computer readable storage medium, which is characterized in that store computer journey on the computer readable storage medium Sequence realizes such as preview image processing side described in any one of claims 1 to 6 when the computer program is executed by processor The step of method.
CN201811393220.XA 2018-11-21 2018-11-21 Preview image processing method and terminal equipment Active CN109474784B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811393220.XA CN109474784B (en) 2018-11-21 2018-11-21 Preview image processing method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811393220.XA CN109474784B (en) 2018-11-21 2018-11-21 Preview image processing method and terminal equipment

Publications (2)

Publication Number Publication Date
CN109474784A true CN109474784A (en) 2019-03-15
CN109474784B CN109474784B (en) 2020-07-17

Family

ID=65672977

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811393220.XA Active CN109474784B (en) 2018-11-21 2018-11-21 Preview image processing method and terminal equipment

Country Status (1)

Country Link
CN (1) CN109474784B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110191314A (en) * 2019-05-07 2019-08-30 百度在线网络技术(北京)有限公司 Camera data processing method, device and mobile unit based on android system
CN110300240A (en) * 2019-06-28 2019-10-01 Oppo广东移动通信有限公司 Image processor, image processing method, camera arrangement and electronic equipment
CN111812691A (en) * 2019-04-11 2020-10-23 北京初速度科技有限公司 Vehicle-mounted terminal and image frame detection processing method and device
CN112217990A (en) * 2020-09-27 2021-01-12 北京小米移动软件有限公司 Task scheduling method, task scheduling device, and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104822048A (en) * 2015-04-16 2015-08-05 浙江工业大学 Multi-format code stream display and storage device based on DaVinci technology
CN104869381A (en) * 2014-02-25 2015-08-26 炬芯(珠海)科技有限公司 Image processing system, method and device
CN105374005A (en) * 2014-08-11 2016-03-02 Arm有限公司 Data processing systems
CN107886481A (en) * 2017-11-06 2018-04-06 维沃移动通信有限公司 A kind of image processing method, device and mobile terminal
CN107993183A (en) * 2017-11-24 2018-05-04 暴风集团股份有限公司 Image processing apparatus, method, terminal and server
US20180156894A1 (en) * 2015-07-20 2018-06-07 Google Llc Method and Apparatus For Increasing The Resolution Of A Time Of Flight Pixel Array
CN108320263A (en) * 2017-12-29 2018-07-24 维沃移动通信有限公司 A kind of method, device and mobile terminal of image procossing

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104869381A (en) * 2014-02-25 2015-08-26 炬芯(珠海)科技有限公司 Image processing system, method and device
CN105374005A (en) * 2014-08-11 2016-03-02 Arm有限公司 Data processing systems
CN104822048A (en) * 2015-04-16 2015-08-05 浙江工业大学 Multi-format code stream display and storage device based on DaVinci technology
US20180156894A1 (en) * 2015-07-20 2018-06-07 Google Llc Method and Apparatus For Increasing The Resolution Of A Time Of Flight Pixel Array
CN107886481A (en) * 2017-11-06 2018-04-06 维沃移动通信有限公司 A kind of image processing method, device and mobile terminal
CN107993183A (en) * 2017-11-24 2018-05-04 暴风集团股份有限公司 Image processing apparatus, method, terminal and server
CN108320263A (en) * 2017-12-29 2018-07-24 维沃移动通信有限公司 A kind of method, device and mobile terminal of image procossing

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111812691A (en) * 2019-04-11 2020-10-23 北京初速度科技有限公司 Vehicle-mounted terminal and image frame detection processing method and device
CN111812691B (en) * 2019-04-11 2023-09-12 北京魔门塔科技有限公司 Vehicle-mounted terminal and image frame detection processing method and device
CN110191314A (en) * 2019-05-07 2019-08-30 百度在线网络技术(北京)有限公司 Camera data processing method, device and mobile unit based on android system
CN110300240A (en) * 2019-06-28 2019-10-01 Oppo广东移动通信有限公司 Image processor, image processing method, camera arrangement and electronic equipment
CN110300240B (en) * 2019-06-28 2021-08-13 Oppo广东移动通信有限公司 Image processor, image processing method, photographing device and electronic equipment
CN112217990A (en) * 2020-09-27 2021-01-12 北京小米移动软件有限公司 Task scheduling method, task scheduling device, and storage medium
CN112217990B (en) * 2020-09-27 2024-04-09 北京小米移动软件有限公司 Task scheduling method, task scheduling device and storage medium

Also Published As

Publication number Publication date
CN109474784B (en) 2020-07-17

Similar Documents

Publication Publication Date Title
CN107770438B (en) A kind of photographic method and mobile terminal
CN107483836B (en) A kind of image pickup method and mobile terminal
CN108182896B (en) A kind of brightness detection method, device and mobile terminal
CN108762640A (en) A kind of display methods and terminal of barrage information
CN109474784A (en) A kind of preview image processing method and terminal device
CN108307109A (en) A kind of high dynamic range images method for previewing and terminal device
CN109743498A (en) A kind of shooting parameter adjustment method and terminal device
CN108989668A (en) A kind of working method and mobile terminal of camera
CN110113528A (en) A kind of parameter acquiring method and terminal device
CN109218626A (en) A kind of photographic method and terminal
CN109005336A (en) A kind of image capturing method and terminal device
CN109544486A (en) A kind of image processing method and terminal device
CN108924414A (en) A kind of image pickup method and terminal device
CN109743506A (en) A kind of image capturing method and terminal device
CN110365853A (en) A kind of reminding method and electronic equipment
CN110213484A (en) A kind of photographic method, terminal device and computer readable storage medium
CN110162254A (en) A kind of display methods and terminal device
CN109525837A (en) The generation method and mobile terminal of image
CN109413264A (en) A kind of background picture method of adjustment and terminal device
CN109104578A (en) A kind of image processing method and mobile terminal
CN109033912A (en) A kind of recognition methods of identification code and mobile terminal
CN107800968B (en) A kind of image pickup method and mobile terminal
CN108234978B (en) A kind of image processing method and mobile terminal
CN109547700A (en) Photographic method and terminal
CN108924413A (en) Image pickup method and mobile terminal

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