CN108184054A - A kind of preprocess method and pretreatment unit for intelligent terminal shooting image - Google Patents

A kind of preprocess method and pretreatment unit for intelligent terminal shooting image Download PDF

Info

Publication number
CN108184054A
CN108184054A CN201711458203.5A CN201711458203A CN108184054A CN 108184054 A CN108184054 A CN 108184054A CN 201711458203 A CN201711458203 A CN 201711458203A CN 108184054 A CN108184054 A CN 108184054A
Authority
CN
China
Prior art keywords
renderer
intelligent terminal
view surface
shooting image
surface example
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
CN201711458203.5A
Other languages
Chinese (zh)
Other versions
CN108184054B (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.)
Shanghai Chuanying Information Technology Co Ltd
Original Assignee
Shanghai Chuanying Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Chuanying Information Technology Co Ltd filed Critical Shanghai Chuanying Information Technology Co Ltd
Priority to CN201711458203.5A priority Critical patent/CN108184054B/en
Publication of CN108184054A publication Critical patent/CN108184054A/en
Application granted granted Critical
Publication of CN108184054B publication Critical patent/CN108184054B/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/62Control of parameters via user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/222Studio circuitry; Studio devices; Studio equipment
    • H04N5/262Studio circuits, e.g. for mixing, switching-over, change of character of image, other special effects ; Cameras specially adapted for the electronic generation of special effects
    • H04N5/2621Cameras specially adapted for the electronic generation of special effects during image pickup, e.g. digital cameras, camcorders, video cameras having integrated special effects capability

Abstract

The present invention provides a kind of preprocess method and pretreatment unit for intelligent terminal shooting image, the preprocess method includes the following steps:In creating a view surface example in the intelligent terminal;In creating a renderer in the intelligent terminal;It is associated with view surface example and the renderer;View surface example obtains one group of shooting image from the driving layer of the intelligent terminal;The renderer renders the shooting image, forms one group of preview data frame.After employing above-mentioned technical proposal, animation effect is realized in the shooting preview interface of intelligent terminal;Application program main thread resource is not take up, does not influence the operational feedback to user, promotes user experience.

Description

A kind of preprocess method and pretreatment unit for intelligent terminal shooting image
Technical field
The present invention relates to intelligent terminal field more particularly to it is a kind of for intelligent terminal shooting image preprocess method and Pretreatment unit.
Background technology
The intelligent terminal can be the smart machine that smart mobile phone, tablet computer, digital camera etc. have camera function. With the development of intelligent terminal technology, the function of being integrated on the intelligent terminal is also increasingly abundanter, particularly camera function, can With support user realize normally take pictures, continuously take pictures, the functions such as self-timer.In the prior art, the intelligent terminal is also equipped with shooting Preview function, i.e., shown on the display interface of the intelligent terminal intelligent terminal camera current shooting arrive in Hold, so that user knows current content of shooting, best shooting effect is realized so as to carry out position adjustment.
At present, it realizes for shooting the preview display technology of image, is constantly obtained according to certain frequency from camera Shooting image is simultaneously shown on the display interface, and the prior art is all whole by the intelligence for the pretreatment for shooting image The class shown for view that operating system provides is held to realize, for example, by using in Android (Android) operating system SurfaceView classes realize the display of preview shooting image.SurfaceView classes are view classes in Android operation system (View) derived class has embedded a view surface example (i.e. Surface) dedicated for drafting in this view class, I Can control the form and size of this view surface example, and Surfaceview classes control this view surface example Draw position.Such realization method is relatively simple, compares saving development amount, but if it is desired to uses SurfaceView Class makes that more complicated animation effect is then extremely difficult, because in the class or interface that are provided in SurfaceView classes, Zhi Nengyong Bitmap format (Bitmap) does animated image, and the animation effect that bitmap format is worked it out is very simple and limitation, example Such as Gaussian Blur, difference reversion fades in and fades out more advanced animation effect and can not all accomplish.
In addition, the common control that Android operation system in relation to interface display provides, for example, TextView, Button and CheckBox etc., they are all that the display interface of oneself is plotted on the drawing surface of host window, it means that they Display interface be to be drawn in the main thread of application program.Since the main thread of application program is in addition to that will draw display Except interface, it is also necessary to user's input is responded in time, otherwise, system just will be considered that application program does not respond to, because This will pop up a dialog box of the application program without response and come out.In Android operation system, if some application program has A period of time response is not sensitive enough, and system can show a dialog box to user, this dialog box is referred to as application program without response (ANR:Application Not Responding) dialog box.User can select " to wait for " and program is allowed to continue to run with, It can select " positive closing ".For some game pictures or camera preview, video playing, their display circle Face is all more complicated, and is required to efficiently be drawn.Therefore, their display interface is just not suitable in application program Main thread in drawn, it is independent at this time just to have to complicated to those and efficiently display interfaces view generations one View surface example and draw the display interface of these views using an independent thread.
In conclusion although the prior art has been realized in the preview to shooting image, but still there are the following problems:
1. it can not realize more advanced animation effect;
2. occupying application program main thread, the operating experience of user is made to be deteriorated.
Therefore how to realize and shooting image is pre-processed, can realize various animation effects, and do not influence user's Operating experience will be a technical issues that need to address.
Invention content
In order to overcome above-mentioned technological deficiency, the purpose of the present invention is to provide a kind of shooting images for making intelligent terminal to have The preprocess method of animation effect, and it is not take up application program main thread resource.
The application's in a first aspect, disclose a kind of preprocess method for intelligent terminal shooting image, including following Step:
In creating a view surface example in the intelligent terminal;
In creating a renderer in the intelligent terminal;
It is associated with view surface example and the renderer;
View surface example obtains one group of shooting image from the driving layer of the intelligent terminal;
The renderer renders the shooting image, forms one group of preview data frame.
Preferably, before a step of view surface example is created in the intelligent terminal, the preprocess method is also Including:
The intelligent terminal enters shooting preview pattern.
Preferably, after the step of renderer renders to the shooting image, forms one group of preview data frame, The preprocess method further includes:
In the preview data frame is shown on the display interface of the intelligent terminal successively.
Preferably, when the renderer renders the shooting image, the renderer works in renders mould on demand Formula or lasting render mode.
Preferably, when creating view surface example with the renderer, view surface example and renderer fortune Row is in a separate threads.
The second aspect of the application discloses a kind of pretreatment unit for intelligent terminal shooting image, including:
First creation module, in creating a view surface example in the intelligent terminal;
Second creation module, in creating a renderer in the intelligent terminal;
Relating module is connect with first creation module and the second creation module, be associated with view surface example with The renderer;
Acquisition module obtains one group of shooting image by view surface example from the driving layer of the intelligent terminal;
Rendering module is connect with the acquisition module, and the shooting image is rendered by the renderer, is formed One group of preview data frame.
Preferably, the pretreatment unit further includes:
Previewing module controls the intelligent terminal to enter shooting preview pattern.
Preferably, the pretreatment unit further includes:
Display module is connect with the rendering module, described pre- in being shown successively on the display interface of the intelligent terminal Look at data frame.
Preferably, when the rendering module renders the shooting image by the renderer, the renderer Work in on-demand render mode or lasting render mode.
Preferably, first creation module and the second creation module create view surface example and the renderer When, view surface example and renderer are run in a separate threads.
After employing above-mentioned technical proposal, compared with prior art, have the advantages that:
1. the shooting preview interface in intelligent terminal realizes animation effect;
2. being not take up application program main thread resource, the operational feedback to user is not influenced, promotes user experience.
Description of the drawings
Fig. 1 is to meet in one embodiment of the present invention to show for the flow of preprocess method of intelligent terminal shooting image It is intended to;
Fig. 2 is the flow for meeting the preprocess method in another preferred embodiment of the present invention for intelligent terminal shooting image Schematic diagram;
Fig. 3 is to meet in one embodiment of the present invention to show for the structure of pretreatment unit of intelligent terminal shooting image It is intended to;
Fig. 4 is the structure for meeting the pretreatment unit in another preferred embodiment of the present invention for intelligent terminal shooting image Schematic diagram.
Reference numeral:
10- for the intelligent terminal shooting pretreatment unit of image, the first creation modules of 11-, the second creation modules of 12-, 13- relating modules, 14- acquisition modules, 15- rendering modules, 16- previewing modules, 17- display modules.
Specific embodiment
The advantages of the present invention is further explained below in conjunction with attached drawing and specific embodiment.
Here exemplary embodiment will be illustrated in detail, example is illustrated in the accompanying drawings.Following description is related to During attached drawing, unless otherwise indicated, the same numbers in different attached drawings represent the same or similar element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they be only with it is such as appended The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
It is only merely for the purpose of description specific embodiment in the term that the disclosure uses, and is not intended to be limiting the disclosure. " one kind " of singulative used in disclosure and the accompanying claims book, " described " and "the" are also intended to including majority Form, unless context clearly shows that other meanings.It is also understood that term "and/or" used herein refers to and wraps Containing one or more associated list items purposes, any or all may be combined.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the disclosure A little information should not necessarily be limited by these terms.These terms are only used for same type of information being distinguished from each other out.For example, not departing from In the case of disclosure range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on linguistic context, word as used in this " if " can be construed to " ... when " or " when ... When " or " in response to determining ".
In the description of the present invention, it is to be understood that term " longitudinal direction ", " transverse direction ", " on ", " under ", "front", "rear", The orientation or position relationship of the instructions such as "left", "right", " vertical ", " level ", " top ", " bottom " " interior ", " outer " is based on attached drawing institutes The orientation or position relationship shown is for only for ease of the description present invention and simplifies description rather than instruction or imply signified dress It puts or element must have specific orientation, with specific azimuth configuration and operation, therefore it is not intended that limit of the invention System.
In the description of the present invention, unless otherwise prescribed and limit, it should be noted that term " installation ", " connected ", " connection " should be interpreted broadly, for example, it may be the connection inside mechanical connection or electrical connection or two elements, it can To be to be connected directly, can also be indirectly connected by intermediary, it for the ordinary skill in the art, can basis Concrete condition understands the concrete meaning of above-mentioned term.
In subsequent description, using for representing that the suffix of such as " module ", " component " or " unit " of element is only Be conducive to the explanation of the present invention, itself there is no specific meanings.Therefore, " module " can mixedly make with " component " With.
Refering to Fig. 1, the preprocess method of image is shot for intelligent terminal to meet in one embodiment of the present invention Flow diagram, the preprocess method include the following steps:
S101:In creating a view surface example in the intelligent terminal.
In the present embodiment, Android operation system, i.e. Android System are run on the intelligent terminal, is sent out by Google The operating system for being widely used in the intelligent terminals such as smart mobile phone, tablet computer of cloth, Google additionally provide abundant answer With interface so that developer carries out secondary development.In this step, in creating a view surface example, institute in the intelligent terminal An example of the i.e. GLSurfaceView classes of view surface example is stated, the GLSurfaceView classes are a view classes, after It holds to SurfaceView classes, provides following properties:
1>In one surface of CameraAp layer-managements, this surface is exactly one piece of special memory, can directly be arranged In version to the view view of android;
2>A GL display is managed, it can allow opengl content to be rendered on above-mentioned surface;
3>User Defined renderer (render);
4>Renderer is allowed to be operated in independent thread and UI threads detach;
5>It supports to render (on-demand) and continuous rendering (continuous) on demand.
Wherein, the CameraAp layers of corresponding layer of application layer for shooting function in Android operation system.It is described The surface that GLSurfaceView is embedded is responsible for OpenGL renderings specially, and this point is to realize the pass of the technology of the present invention effect Key.The OpenGL full name are Open Graphics Library, are to define one across programming language, cross-platform volume The library of journey interface, it for three-dimensional image (two-dimentional also can) processing, be a profession graphic package interface and a work( Can be powerful, call convenient underlying graphics library.OpenGL ES (OpenGL for Embedded Systems) are OpenGL tri- The subset of figure API is tieed up, is designed for embedded devices such as mobile phone, PDA and game hosts.OpenGL ES are from OpenGL The customization of cutting and come, eliminate glBegin/glEnd, quadrangle (GL_QUADS), polygon (GL_POLYGONS) etc. multiple The characteristic of many not required that they be so such as miscellaneous pel, is specially designed mainly for a variety of embedded systems, including console, mobile electricity Words, handheld device, home appliance and automobile.
Heretofore described intelligent terminal provides GLSurfaceView groups using OpenGL ES, the OpenGL ES Part realizes the animation effect processing to image.Example is created by GLSurfaceView classes in the present invention, different from existing skill The display of preview shooting image is realized in art by SurfaceView classes, can be called by GLSurfaceView classes Powerful image processing function or function in OpenGL ES, realize rich and varied animation effect.
Another advantage for the example that GLSurfaceView classes are created is that the example is run in independent thread, and It is not take up the main thread of application program.Thread, sometimes referred to as Lightweight Process (Lightweight Process, LWP) are Program performs the minimum unit of stream.The thread of one standard is by Thread Id, current instruction pointer (PC), set of registers and storehouse Composition;In addition, thread is an entity in process, it is the base unit independently dispatched and assigned by system, thread oneself is not Possess system resource, only possess essential resource in operation a bit, but it can be with belonging to other lines of a process Journey shares whole resources that process is possessed.One thread can create and cancel another thread, multiple in same process It can concurrently be performed between thread.Due to the mutual restriction between thread, thread is caused to show discontinuity in operation.Thread Also there are three kinds of basic status of ready, obstruction and operation, ready state refers to that thread has all conditions of operation, in logic can be with Operation is waiting for processor;Operating status refers to that thread occupies processor and is currently running;Blocked state refers to that thread is waiting for one A event (such as some semaphore), not can perform in logic.At least one thread of each program, if there are one programs Thread, that is, program is in itself.When view surface example is run after being created, transported on the independent thread of oneself Row will not occupy the resource of the main thread (namely UI threads) of application program, and intelligent terminal described in this way is in processing shooting figure While picture, the task of application program can also be responded, user's operation operating lag not caused, relative to the prior art In on UI threads realize shooting image procossing can cause operating lag, improve user experience.
S102:In creating a renderer in the intelligent terminal.
The renderer is referred to as Render in Android operation system, can carry out rendering processing to image.It is creating It before the renderer, also needs that EGL is configured, Android device often supports a variety of EGL to be configured, and can use difference The channel (channel) of number can also specify each channel to have different number of position (bits) depth.Therefore, it is rendering The configuration of EGL should be just specified before device work.The pixel format that EGL configurations are given tacit consent in GLSurfaceView classes is RGB_ The depth buffer (depth buffer) of 656,16, acquiescence are not turned on shade caching (stencil buffer), and user can be with The EGL configurations are adjusted according to the camera pixel of intelligent terminal and the pixel of display interface, to different EGL is selected to match It puts, is realized using one kind in setEGLConfigChooser methods.
When creating the renderer, in CameraAp layers of realization, pass through setRenderer (GLSurfaceView.Renderer) GLSurfaceView.Renderer, that is, renderer, renderer are registered It is responsible for really to the rendering work of image.The renderer is still operated under the frame of GLSurfaceView classes, and described View surface example carries out data interaction.After renderer setting, it can use setRenderMode (int) is specified to render mould Formula is on-demand rendering (on demand) or continuous rendering (continuous), and acquiescence is continuously to render.Renderer will be at one It is called in the thread of separation, therefore rendering performance is decoupled with UI threads, that is to say, that the work of renderer will not occupy The resource of UI threads, does not influence user's operation.
S103:It is associated with view surface example and the renderer.
Only view surface example with the renderer is associated, can realize the place of image on the whole Reason.The mode of both associations can be realized by interface, such as view surface example will need the image rendered by interface The renderer is sent to, the image after rendering can also be sent back to view surface example by the renderer by interface. The two can also carry out data interaction by way of action listener, can complete event using the inter-thread communication of java standards Monitoring, when the renderer listened to incoming event or shooting event when, just start render.
S104:View surface example obtains one group of shooting image from the driving layer of the intelligent terminal.
During the camera shooting image of the intelligent terminal, scenery projects image by the optical imagery that camera lens generates and passes On sensor (Sensor) surface, electric signal is then turned to, becomes data image signal after being converted using A/D (analog-to-digital conversion), The data image signal can be obtained from the driving layer.The driving layer is important one layer in Android operation system, It is referred to as kernel, includes display driving, webcam driver, flash drive, Binder (IPC) driving, keyboard drive, Wifi drives Dynamic, audio driven and power management section, the same with all linux kernels, Android kernel is between hardware layer and software group Between an abstraction hierarchy.In this step, view surface example can obtain one group of shooting figure by webcam driver Picture, the webcam driver are provided with the interface towards upper strata, can carry out the data transmission of shooting image.Since user uses When the intelligent terminal is taken pictures, the camera is in opening state, can persistently be shot according to certain frequency, so as to shape Into one group of shooting image.
S105:The renderer renders the shooting image, forms one group of preview data frame.
Get one group of shooting image is sent to the renderer by view surface example, and the renderer is to institute Shooting image is stated to be rendered, that is, redraw.It renders, last procedure for being CG is also (certainly, in addition to post-production) In the final stage that image is made to meet 3D scenes, English is Render, and we are often model or scene in practical work Image file, vision signal or cinefilm are exported into, this just has to pass through Render programs.Rendering can make the shooting Image generates different effects, such as the intensification of color gradient, background, Fuzzy Processing etc..The renderer uses fixed in OpenGL The function of justice realizes abundant animation effect.Since the shooting image is one group, that is, it is made of multiple shooting images, Each shooting image corresponds to a preview data frame, therefore can correspond to rendering and form one group of preview data frame, each preview data Frame is all the image that can be directly shown on the intelligent terminal display interface.If by the preview data frame according to preset Rate plays out, and can be achieved with corresponding animation effect.
Referring to Fig.2, shoot the preprocess method of image in another preferred embodiment of the present invention for intelligent terminal to meet Flow diagram, before step S101 ', the preprocess method further includes:
S100:The intelligent terminal enters shooting preview pattern.
The intelligent terminal has shooting preview pattern, that is, after opening shooting function, is shown on the screen of the intelligent terminal Show the content of shooting of preview, with the movement of intelligent terminal, the content of shooting of the preview shown on screen can also change therewith, use Family can determine best shooting scene according to the content of shooting of preview.The realization of the shooting preview pattern, must be according to some The image of the testee is converted to digital picture by the camera of intelligent terminal described in frequency coordination by photosensitive element And show on the screen, it is also needed by pretreatment before showing shooting image in the present invention on the screen, that is, The process of step S101 ' to step S105 '.The shooting preview pattern can select the operation button on display interface to beat by user It opens, after the shooting preview pattern is opened, the shooting image preprocessing process in triggering following step.
After the step S105 ', the preprocess method further includes:
S106:In the preview data frame is shown on the display interface of the intelligent terminal successively.
This step realizes the closed loop of shooting preview pattern, that is, last display link.The step S101 ' is to step S105 ' realizes the pretreatment of original shooting image shot to the camera, and forms special by having for rendering Determine the preview data frame of effect, this step shows the preview data frame according to specific frequency.After the renderer will render Preview data frame be sent to view surface example, view surface example can according to internal existing display methods or Function shows the preview data frame, and can set display rate.Show the preview data frame frequency should with it is described The frequency of camera shooting is consistent, and this makes it possible to real-time display preview content, not interim card, it is every that the frequency is at least 24 frames Second.
As being further improved for the preprocess method, when the renderer renders the shooting image, institute It states renderer and works in on-demand render mode or lasting render mode.When the renderer creates, it can use It is on-demand rendering (on demand) or continuous rendering (continuous) that setRenderMode (int), which specifies render mode,. Continuous render is constantly to refresh to redraw, and the frame per second for giving tacit consent to refreshing is 60FPS, i.e. 16ms is just redrawn once, to intelligent terminal Performance consumption it is bigger, such consumption can pattern be suitble to the effect for having lasting animation.The on-demand rendering is then according to mesh The working frequency or working time that the setting of mark demand renders, have higher flexibility.
As being further improved for the preprocess method, when creating view surface example with the renderer, institute It states view surface example and renderer is run in a separate threads.View surface example and renderer belong to Under the frame of GLSurfaceView classes, it can be run in same thread, it is mutual indepedent with UI processes, UI processes will not be occupied Resource, also would not to the operation of user interface respond impact.UI refers to user interface, i.e. user interface, Contain the multiple functions of the interface display and reception user's operation to user.
Refering to Fig. 3, the pretreatment unit 10 of image is shot in one embodiment of the present invention for intelligent terminal to meet Structure diagram, the pretreatment unit 10 includes:
- the first creation module 11
First creation module 11 is in creating a view surface example in the intelligent terminal.First creation module 11 pairs of GLSurfaceView classes generate an example, i.e., described view surface example can be realized by performing example establishment instruction The establishment of example.When first creation module 11 creates the view surface example, Initialize installation can be also changed, for intelligence The performance parameter of energy terminal realizes different configurations.
- the second creation module 12
Second creation module 12 is in creating a renderer in the intelligent terminal.Second creation module 12 is being created It builds before the renderer, also needs that EGL is configured, Android device often supports a variety of EGL to be configured, and can use not With the channel (channel) of number, it can also specify each channel that there is different number of position (bits) depth, to select not Same EGL configurations, are realized using one kind in setEGLConfigChooser methods.
When second creation module 12 creates the renderer, in CameraAp layers of realization, pass through setRenderer (GLSurfaceView.Renderer) GLSurfaceView.Renderer, that is, renderer, renderer are registered It is responsible for really to the rendering work of image.
Relating module 13
The relating module 13 is connect with 11 and second creation module 12 of the first creation module, is associated with the view table Face example and the renderer.The relating module 13 realizes the pass of view surface example and the renderer by interface The image for needing to render is sent to the renderer by connection, such as view surface example by interface, and the renderer is also Can the image after rendering be sent back to by view surface example by interface.The relating module 13 also provides monitor function, View surface example carries out data interaction with the renderer by way of action listener, can use java standards Inter-thread communication completes the monitoring of event, when the renderer has listened to incoming event or shooting event, just starts wash with watercolours Dye.
Acquisition module 14
The acquisition module 14 obtains one group of shooting by view surface example from the driving layer of the intelligent terminal Image.The interface that 14 webcam driver of acquisition module provides obtains the shooting image, and coordinates the bat of the camera It takes the photograph frequency and persistently obtains one group of shooting image.
Rendering module 15
The rendering module 15 is connect with the acquisition module 14, and wash with watercolours is carried out to the shooting image by the renderer Dye forms one group of preview data frame.The rendering module 15 obtains the shooting image from the acquisition module 14, and by described Renderer renders the shooting image, forms such as intensification of color gradient, background, Fuzzy Processing and other effects.
Refering to Fig. 4, the pretreatment unit of image is shot in another preferred embodiment of the present invention for intelligent terminal to meet 10 structure diagram, the pretreatment unit 10 further include:
Previewing module 16
The previewing module 16 controls the intelligent terminal to enter shooting preview pattern.Intelligent terminal described in the present embodiment Has shooting preview pattern, that is, after opening shooting function, the previewing module 16 is pre- in being shown on the screen of the intelligent terminal The content of shooting look at, with the movement of intelligent terminal, the content of shooting of the preview shown on screen can also change therewith.It is described pre- Camera of the module 16 according to intelligent terminal described in some frequency coordination is look at, by the image of the testee by photosensitive member Part is converted to digital picture and shows on the screen.The previewing module 16 is pressed in display operation on the display interface Button allows user to select to open or close shooting preview pattern, after the shooting preview pattern is opened, calls described first to create 11 and second creation module 12 of module opens shooting image preprocessing process.
As being further improved for above-mentioned pretreatment unit 10, the pretreatment unit 10 further includes:
Display module 17
The display module 17 is connect with the rendering module 15, in being shown successively on the display interface of the intelligent terminal The preview data frame.The display module 17 obtains the preview data frame from the rendering module 15, and according to specific Frequency shows the preview data frame.The display module 17 shows that the frequency of the preview data frame should be with the camera The frequency of shooting is consistent, and this makes it possible to real-time display preview content, not interim card, it is per second that the frequency is at least 24 frames.
As being further improved for the pretreatment unit 10, the rendering module 15 is by the renderer to the bat When taking the photograph image and being rendered, the renderer works in on-demand render mode or lasting render mode.Second creation module During the 12 establishment renderer, it be on-demand rendering (on that setRenderMode (int) can be used, which to specify render mode, Demand) or continuously (continuous) is rendered.
As being further improved for the pretreatment unit 10,11 and second creation module 12 of the first creation module is created When building view surface example with the renderer, view surface example and renderer are run in a separate threads. View surface example and renderer are belonged under the frame of GLSurfaceView classes, can be run in same thread, with UI processes are mutual indepedent, will not occupy the resource of UI processes, and also the operation of user interface would not be responded and impacted.It is described When first creation module 11 and the second creation module 12 create view surface example with the renderer, it can distribute relevant System resource is to view surface example and the renderer, the separate threads where it to be supported to run.
It should be noted that the embodiment of the present invention has preferable implementation, and not the present invention is made any type of Limitation, any one skilled in the art change or are modified to possibly also with the technology contents of the disclosure above equivalent effective Embodiment, as long as without departing from the content of technical solution of the present invention, what technical spirit according to the present invention made above example Any modification or equivalent variations and modification, in the range of still falling within technical solution of the present invention.

Claims (10)

1. a kind of preprocess method for intelligent terminal shooting image, which is characterized in that include the following steps:
In creating a view surface example in the intelligent terminal;
In creating a renderer in the intelligent terminal;
It is associated with view surface example and the renderer;
View surface example obtains one group of shooting image from the driving layer of the intelligent terminal;
The renderer renders the shooting image, forms one group of preview data frame.
2. preprocess method as described in claim 1, which is characterized in that
Before a step of view surface example is created in the intelligent terminal, the preprocess method further includes:
The intelligent terminal enters shooting preview pattern.
3. preprocess method as claimed in claim 2, which is characterized in that
After the step of renderer renders to the shooting image, forms one group of preview data frame, the pretreatment Method further includes:
In the preview data frame is shown on the display interface of the intelligent terminal successively.
4. such as claim 1-3 any one of them preprocess methods, which is characterized in that
When the renderer renders the shooting image, the renderer works in on-demand render mode or lasting rendering Pattern.
5. such as claim 1-3 any one of them preprocess methods, which is characterized in that
When creating view surface example with the renderer, view surface example and renderer run on an independent lines Cheng Zhong.
6. a kind of pretreatment unit for intelligent terminal shooting image, which is characterized in that including:
First creation module, in creating a view surface example in the intelligent terminal;
Second creation module, in creating a renderer in the intelligent terminal;
Relating module is connect with first creation module and the second creation module, be associated with view surface example with it is described Renderer;
Acquisition module obtains one group of shooting image by view surface example from the driving layer of the intelligent terminal;
Rendering module is connect with the acquisition module, and the shooting image is rendered by the renderer, forms one group Preview data frame.
7. pretreatment unit as claimed in claim 6, which is characterized in that
The pretreatment unit further includes:
Previewing module controls the intelligent terminal to enter shooting preview pattern.
8. pretreatment unit as claimed in claim 7, which is characterized in that
The pretreatment unit further includes:
Display module is connect with the rendering module, in showing the preview number on the display interface of the intelligent terminal successively According to frame.
9. such as claim 6-8 any one of them pretreatment units, which is characterized in that
When the rendering module renders the shooting image by the renderer, the renderer works in on-demand wash with watercolours Dye pattern or lasting render mode.
10. such as claim 6-8 any one of them pretreatment units, which is characterized in that
When first creation module and the second creation module create view surface example with the renderer, the view Surface example and renderer are run in a separate threads.
CN201711458203.5A 2017-12-28 2017-12-28 Preprocessing method and preprocessing device for images shot by intelligent terminal Active CN108184054B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711458203.5A CN108184054B (en) 2017-12-28 2017-12-28 Preprocessing method and preprocessing device for images shot by intelligent terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711458203.5A CN108184054B (en) 2017-12-28 2017-12-28 Preprocessing method and preprocessing device for images shot by intelligent terminal

Publications (2)

Publication Number Publication Date
CN108184054A true CN108184054A (en) 2018-06-19
CN108184054B CN108184054B (en) 2020-12-08

Family

ID=62548180

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711458203.5A Active CN108184054B (en) 2017-12-28 2017-12-28 Preprocessing method and preprocessing device for images shot by intelligent terminal

Country Status (1)

Country Link
CN (1) CN108184054B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110312117A (en) * 2019-06-12 2019-10-08 北京达佳互联信息技术有限公司 Method for refreshing data and device
CN112217990A (en) * 2020-09-27 2021-01-12 北京小米移动软件有限公司 Task scheduling method, task scheduling device, and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103617027A (en) * 2013-10-29 2014-03-05 合一网络技术(北京)有限公司 Android-based method and system for constructing image rendering engine
CN104517309A (en) * 2013-10-08 2015-04-15 博雅网络游戏开发(深圳)有限公司 Method and device for processing animation in frame loop
CN105916052A (en) * 2015-12-15 2016-08-31 乐视致新电子科技(天津)有限公司 Video frame drawing method and device
CN106230841A (en) * 2016-08-04 2016-12-14 深圳响巢看看信息技术有限公司 A kind of video U.S. face and the method for plug-flow in real time in network direct broadcasting based on terminal
CN106791408A (en) * 2016-12-27 2017-05-31 努比亚技术有限公司 A kind of shooting preview device, terminal and method
CN106792034A (en) * 2017-02-10 2017-05-31 深圳创维-Rgb电子有限公司 Live method and mobile terminal is carried out based on mobile terminal
CN107203960A (en) * 2016-06-30 2017-09-26 北京新媒传信科技有限公司 image rendering method and device
US20170337727A1 (en) * 2016-03-02 2017-11-23 International Business Machines Corporation Digital surface rendering
CN107463370A (en) * 2017-06-30 2017-12-12 百度在线网络技术(北京)有限公司 Striding course rendering intent and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104517309A (en) * 2013-10-08 2015-04-15 博雅网络游戏开发(深圳)有限公司 Method and device for processing animation in frame loop
CN103617027A (en) * 2013-10-29 2014-03-05 合一网络技术(北京)有限公司 Android-based method and system for constructing image rendering engine
CN105916052A (en) * 2015-12-15 2016-08-31 乐视致新电子科技(天津)有限公司 Video frame drawing method and device
US20170337727A1 (en) * 2016-03-02 2017-11-23 International Business Machines Corporation Digital surface rendering
CN107203960A (en) * 2016-06-30 2017-09-26 北京新媒传信科技有限公司 image rendering method and device
CN106230841A (en) * 2016-08-04 2016-12-14 深圳响巢看看信息技术有限公司 A kind of video U.S. face and the method for plug-flow in real time in network direct broadcasting based on terminal
CN106791408A (en) * 2016-12-27 2017-05-31 努比亚技术有限公司 A kind of shooting preview device, terminal and method
CN106792034A (en) * 2017-02-10 2017-05-31 深圳创维-Rgb电子有限公司 Live method and mobile terminal is carried out based on mobile terminal
CN107463370A (en) * 2017-06-30 2017-12-12 百度在线网络技术(北京)有限公司 Striding course rendering intent and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110312117A (en) * 2019-06-12 2019-10-08 北京达佳互联信息技术有限公司 Method for refreshing data and device
CN110312117B (en) * 2019-06-12 2021-06-18 北京达佳互联信息技术有限公司 Data refreshing method and device
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
CN108184054B (en) 2020-12-08

Similar Documents

Publication Publication Date Title
CN106126229B (en) Special efficacy generation method and device
CN103139478B (en) A kind of photographic method of major-minor picture real-time rendering
CN105389090B (en) Method and device, mobile terminal and the computer terminal of game interaction interface display
CN103338235B (en) On mobile phone, realize the method for dynamic wallpaper interactive mode, personalized creation
CN109389664A (en) Model pinup picture rendering method, device and terminal
CN106339061A (en) Mobile terminal and method of run application thereof
CN106534667A (en) Distributed cooperative rendering method and terminal
CN107291319A (en) A kind of window display method, information interacting method and system
CN111754607A (en) Picture processing method and device, electronic equipment and computer readable storage medium
CN101764971A (en) On-screen display device and on-screen display method thereof
CN105975168A (en) OSD menu fading-in and fading-out method and device
CN108184054A (en) A kind of preprocess method and pretreatment unit for intelligent terminal shooting image
WO2022252924A1 (en) Image transmission and display method and related device and system
CN113038141B (en) Video frame processing method and electronic equipment
CN109587561A (en) Method for processing video frequency, device, electronic equipment and storage medium
CN109104628B (en) Focus foreground generation method, storage medium, device and system of android television
CN112686939A (en) Depth image rendering method, device and equipment and computer readable storage medium
CN107016976A (en) Display control method and device and display screen system
WO2023005751A1 (en) Rendering method and electronic device
CN114513574B (en) Interface display method, electronic device and storage medium
CN103338143A (en) Method, apparatus and system for realizing image sharing
CN115546410A (en) Window display method and device, electronic equipment and storage medium
CN114863432A (en) Terminal device, contrast adjusting method, device and medium
WO2023280241A1 (en) Image picture rendering method and electronic device
CN115686727B (en) Method for realizing synthesis rendering based on wlroots

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