Background technology
When carrying out the video image demonstration; Sometimes not only need to show in real time the dynamic video image of input; Also need the still image stored in the display system, for example when taking " FSCaller " picture, in input portrait video; Also need show different scenery images in background, be to be in the different scenery so that take portrait to look.For another example, the display screen of DV or digital camera not only will show the dynamic video image of transducer input also will show the certain operations menu in real time, so that camera, video camera are provided with or image is made amendment.
The existing system that dynamic image, still image are shown simultaneously is as shown in Figure 1, comprising: dynamic image loader 101, still image memory 102, image brushing controller 103, user interface 104 and image display 105.Wherein:
Dynamic image loader 101 is used for: from transducer (sensor) input dynamic image.This dynamic image is the input continuously of a frame one frame, and this dynamic image will show as dynamic image layer (Layer A).The characteristics of this LayerA are, need refresh in real time, and the image of input can not stop, and must refresh according to the speed of input; Width of this dynamic image (width) and height (height) must be identical with height with the width that user interface is provided with.
Still image memory 102 is used for:
The storage still image.This still image shows as still image layer (Layer B).Layer B is passive, and " image brushing controller " read just when needing; Layer B generally is application such as menu, so the requirement of map brushing frame per second is lower.
Layer B can have a plurality of, for example can be called Layer B0, Layer B1, Layer Bn respectively.A plurality of Layer B processing methods are all the same, require can not cover each other between all Layer B layers.Width of this still image (width) and height (height) must be identical with height with the width that user interface is provided with.
User interface 104 is used for:
1) width of the image of setting " dynamic image loader " input; Height; Position x (image is the x position on image display); Position y (image is the y position on image display), Framex (from the original image of input, digging the x position of figure), Frame Y (from the original image of input, digging the y position of figure);
2) width, height, Position x, Positiony, Frame x, the Frame Y of the image of setting " still image memory " input;
3) height, the width of setting " image display ";
4) part of LayerA and Layer B stack is done the mode of covering (overlay);
Image display (Panel) 105 is used for:
1) shows the image that " image brushing controller 103 " conveying is come;
2) be the device that can show, liquid crystal panel (lcd panel) for example, cathode-ray tube display (crt) or the like.
Image brushing controller 103, be used for carrying out map brushing according to Layer A and Layer B; The main distinction is handled trizonal map brushing: the overlapping region of Layer A and Layer B; The isolated area of Layer A (promptly removing zone afterwards, overlapping region), the isolated area of Layer B.Wherein, The direct map brushing of the isolated area of Layer A; Directly map brushing after the computing is carried out in the overlapping region of Layer A and Layer B, covering (overlay) mode that is provided with according to " user interface 104 ", and the isolated area of Layer B generally is in the gap of the frame of LayerA, to carry out map brushing.
In above existing technical scheme, exceed the Layer B (independent sector of Layer B just) of Layer A, must in the gap of a frame layer A, refresh and finish; This will just cause layer A must guarantee that enough big gap will be arranged, and the gap of Layer A is big, and map brushing efficient has reduced, and the frame per second of system has just reduced.
In addition, in the prior art, the data slit of Layer A (pixelblank), and row and the gap (hblank) of going, figure refreshes the part that the Layer B ultrasonic goes out Layer A with the gap (vblank) of figure, is that program is fixing in the dust; And sometimes, for example pixel blank is especially little, has no idea to be used for map brushing at all, can only use Hblank and VBlank map brushing.
Summary of the invention
The method and the device that the purpose of this invention is to provide a kind of image refreshing of multi-layer image; Once refreshing of still image layer can be accomplished in the gap of multiframe dynamic image data; Solve prior art and finish because must in the gap of a frame layer A, refresh; The gap of the Layer A that is caused is big, the inefficient technical problem of map brushing.
To achieve these goals; On the one hand, providing. a kind of method of image refreshing of multi-layer image, said multi-layer image comprise dynamic image layer and still image layer; Has the overlapping region between said dynamic image layer and the said still image layer; The zone of said dynamic image layer outside said overlapping region is dynamic isolated area, and the zone of said still image layer outside said overlapping region is static isolated area, and said method comprises:
Input dynamic image layer data reads the still image layer data;
Utilize said dynamic image layer data directly to refresh said dynamic isolated area;
Utilize said dynamic image layer data and said still image layer data, carry out refreshing said overlapping region after the computing according to preset coverage mode;
Said static isolated area is refreshed in gap in the current data frame of said dynamic image layer data; And judge whether said static isolated area refreshes in said current data frame and finish; Be then to show; Otherwise write down the location point that refreshes of said static isolated area, and in next Frame of said dynamic image layer data, continue to refresh said static isolated area.
Preferably, in the above-mentioned method, also comprise the step that the gap in the said current data frame is set, the gap in the said current data frame is chosen as the gap of data slit, row and row and/or the gap of figure and figure according to setting.
Preferably, in the above-mentioned method, the gap in the said current data frame is chosen as said row and the gap of row and the gap of said figure and figure according to setting.
Preferably; In the above-mentioned method; The step that refreshes location point that writes down said static isolated area specifically comprises: be recorded in the current position of reading of still image layer data described in the still image memory, be recorded in the current position of refreshing of the above still image layer of image display.
Preferably, in the above-mentioned method, before the step of said input dynamic image layer data, also comprise step is set:
Through user interface, said dynamic image layer and image parameter said still image layer are set.
Preferably; In the above-mentioned method, said step is set after, also comprise the detection step: detect the indication range whether said image parameter has exceeded image display; If exceeded indication range, return the information of resetting said image parameter to said user interface.
Preferably, in the above-mentioned method, said still image layer comprises the image block of a plurality of non-overlapping copies.
The present invention also provides a kind of device of image refreshing of multi-layer image; Said multi-layer image comprises dynamic image layer and still image layer; Has the overlapping region between said dynamic image layer and the said still image layer; The zone of said dynamic image layer outside said overlapping region is dynamic isolated area, and the zone of said still image layer outside said overlapping region is static isolated area, and said device comprises:
The dynamic image loader is used for: input dynamic image layer data
The still image memory is used for: storage still image layer data;
Image brushing controller is used for: utilize said dynamic image layer data directly to refresh said dynamic isolated area; Utilize said dynamic image layer data and said still image layer data, carry out refreshing said overlapping region after the computing according to preset coverage mode; Said static isolated area is refreshed in gap in the current data frame of said dynamic image layer data; And judge whether said static isolated area refreshes in said current data frame and finish; Be then to show; Otherwise write down the location point that refreshes of said static isolated area, and in next Frame of said dynamic image layer data, continue to refresh said static isolated area;
Register is used to store the said location point that refreshes;
Image display is used for: show the image after said image brushing controller refreshes.
Preferably, in the above-mentioned device, also comprise user interface, be used for:
The step in the gap in the said current data frame is set, and the gap in the said current data frame is chosen as the gap of data slit, row and row and/or the gap of figure and figure according to setting;
The image parameter of said dynamic image layer and said still image layer is set.
Preferably; In the above-mentioned device; Also comprise error detector; Be used for: detect the image parameter of said dynamic image layer and the image parameter of said still image layer and whether exceeded the indication range of image display,, return the information of resetting image parameter to said user interface if exceeded indication range.
Preferably, in the above-mentioned device, said still image layer comprises the image block of a plurality of non-overlapping copies, and the difference corresponding stored is in a plurality of said still image memories.
There is following technique effect at least in the present invention:
1) because dynamic image requires to refresh in real time; And the requirement that still image refreshes is lower; So the requirement that the present invention uses according to reality, dynamic image preferentially refreshes in real time, and still image in the data slit of multiframe dynamic image, in the ranks refresh in crack, the frame gap; Thereby improved the efficient of map brushing, guaranteed the map brushing frame per second.
2) the present invention is according to the characteristics of difference figure layer, and record position point when in each gap of a frame dynamic image, can not brushing Wan still image then brush at next frame, so still image can refresh in each gap of multiframe dynamic image.
3) whether the present invention detects each still image piece by " error detector " and superposes, and whether the detected image parameter has exceeded the size of panel, thereby corrects this type mistake.
4) user interface of the present invention can be used for selecting the used gap of map brushing, thereby gets rid of too small unserviceable gap.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the invention is clearer, will combine accompanying drawing that specific embodiment is described in detail below.
The flow chart of steps of the method that Fig. 2 provides for the embodiment of the invention.In the method for the image refreshing of the multi-layer image of the embodiment of the invention; Said multi-layer image comprises dynamic image layer and still image layer; Has the overlapping region between said dynamic image layer and the said still image layer; The zone of said dynamic image layer outside said overlapping region is dynamic isolated area, and the zone of said still image layer outside said overlapping region is static isolated area; As shown in Figure 2, said method comprises:
Step 201, input dynamic image layer data reads the still image layer data;
Step 202 utilizes said dynamic image layer data directly to refresh said dynamic isolated area;
Step 203 is utilized said dynamic image layer data and said still image layer data, carries out refreshing said overlapping region after the computing according to preset coverage mode;
Step 204; Said static isolated area is refreshed in gap in the current data frame of said dynamic image layer data; And judge whether said static isolated area refreshes in said current data frame and finish; Be then to show, otherwise write down the location point that refreshes of said static isolated area, and in next Frame of said dynamic image layer data, continue to refresh said static isolated area.
Wherein, step 202,203, the 204th is carried out side by side, in the gap execution in step 204 of the dynamic image layer data of step 202.
Before step 201; Can also comprise the gap that is provided with in the said current data frame; Gap in the said current data frame can be selected from the gap of: data slit, row and row and/or figure and the gap three who schemes; Because sometimes the data slit is very little, so general preferred row and the gap of row and the gap of figure and figure.
The detail flowchart of the method that Fig. 3 provides for the embodiment of the invention, wherein Layer B is example with two memories (corresponding stored Layer B0, Layer B1), as shown in the figure, embodiment of the invention detailed process is following:
Step 300, beginning;
Step 310 is imported layerA continuously by the dynamic image loader;
Step 311 as required, reads Layer B0/Layer B1 from the still image memory;
Step 312 refreshes the part (from left to right, from falling down to brush screen) of layerA and LayerA and Layer B stack earlier;
Step 313, the part of Layer A and Layer B stack is according to directly map brushing after the overlay mode computing of " user interface " setting;
Step 314, according to the setting of user interface, at the pixelblank of Layer A, blank refreshes the Layer B part that exceeds layerA during vblank;
Step 315, does corresponding Layer B refresh and finishes in the gap of this frame Layer A? Be then to change step 318, otherwise change step 316;
Step 316, when writing down this frame Layer A map brushing, the physical location that reads among the Layer B " still image memory ";
Step 317, when writing down this frame Layer A map brushing, step 310 is changeed in the position that Layer B refreshes on panel in real time;
Step 318 shows Layer A and Layer B at " image display (Panel) ".
Wherein, after beginning, can also comprise the process that user interface is provided with, as shown in Figure 3, the process of this setting comprises:
Step 301 is provided with the widht of layerA/layerB0/LayerB1, height, position x, y, frame x, y respectively at " user interface "; The width of panel, height......
Whether step 302 detects layer B0 and Layer B1 and superposes, and is then to change step 304, otherwise changes step 303;
Step 303, the height of detection Layer A/B0/B1, width and position x, y are provided with the size that whether has exceeded panel, and being then changes step 304, otherwise changes step 312;
Step 304 is returned error message and is given user interface, lets user interface from new setting.
The embodiment of the invention also provides a kind of device of image refreshing of multi-layer image, the structure chart of the device that Fig. 4 provides for the embodiment of the invention, and as shown in the figure, said device comprises:
Dynamic image loader 401 is used for: input dynamic image layer data
Still image memory 402 is used for: storage still image layer data;
Image brushing controller 403 is used for: utilize said dynamic image layer data directly to refresh said dynamic isolated area; Utilize said dynamic image layer data and said still image layer data, carry out refreshing said overlapping region after the computing according to preset coverage mode; Said static isolated area is refreshed in gap in the current data frame of said dynamic image layer data; And judge whether said static isolated area refreshes in said current data frame and finish; Be then to show; Otherwise write down the location point that refreshes of said static isolated area, and in next Frame of said dynamic image layer data, continue to refresh said static isolated area;
Register 404 is used to store the said location point that refreshes;
Image display 405 is used for: show the image after said image brushing controller refreshes.
In addition, also comprise user interface 406, be used for: the step in the gap in the said current data frame is set, and the gap in the said current data frame is chosen as the gap of data slit, row and row and/or the gap of figure and figure according to setting; The image parameter of said dynamic image layer and said still image layer is set.
Error detector 407; Be used for: whether the image parameter that detects image parameter and the said still image layer of said dynamic image layer has exceeded the indication range of image display; If exceeded indication range, return the information of resetting image parameter to said user interface.
The still image memory can have a plurality of, for example can be called respectively B0, B1 ... Bn.
Corresponding, Layer B can be divided into the piece of a plurality of non-overlapping copies, for example can be called Layer B0 respectively, Layer B1 ... Layer Bn, corresponding stored is in a plurality of still image memories.
Below only there to be Layer B0, Layer B1 is an example, specifies each parts of refreshing apparatus.
User interface:
1) width of the image of setting " dynamic image loader " input; Height; Position x (image is the x position on panel); Position y (image is the y position on panel), Frame x (from the original image of input, digging the x position of figure), Frame Y (y that from the original image of input, digs figure puts);
2) width of the image of setting " still image memory " input; Height; Position x (image is the x position on panel); Position y (image is the y position on panel), Frame x (from the original image of input, digging the x position of figure), Frame Y (y that from the original image of input, digs figure puts);
3) height, the width of setting " image display ";
4) part of Layer A and Layer B stack is overlay;
5) the partial L ayer B that Layer A and layer B do not superpose is set and partly uses pixelblank, hblank, vblank three only use still with one of which or its two and refresh;
Error detector:
1) detects layer B0 and Layer B1 and whether superpose, give user interface if error message is just returned in stack;
2) height of detection Layer A, width and position x, y are provided with the size that whether has exceeded panel; Just return error message to user interface if exceed;
3) height of detection Layer B0 or layer B1, width and position x, y are provided with the size that whether has exceeded panel; Just return error message to user interface if exceed;
Dynamic image loader (layer A):
1) representes with Layer A;
2) characteristics of this image layers are, need refresh in real time, and the image of input can not stop, and must refresh according to the speed of input;
3) for example, this figure layer is the data from the sensor input;
4) width of this dynamic image and height must be identical with height with the width that user interface is provided with;
5) this image is the input continuously of a frame one frame;
Still image memory (Layer B):
1) representes with Layer B;
2) if " still image memory " has a plurality ofly, just is Layer B0, Layer B1, LayerBn respectively;
3) a plurality of Layer B processing methods are all the same, require all B tomographic images not cover each other;
4) width of this still image and height must be identical with height with the width that user interface is provided with;
5) the present invention will give an example with 2 Layer B and write, and be respectively Layer B0, Layer B1;
6) layer B is passive, and " image brushing controller " read just when needing;
7) Layer B generally is application such as menu, so the requirement of map brushing frame per second is lower;
Image brushing controller:
1) utilize data (data) gaps (pixelblank) of Layer A, the gap (hblank) of row and row, figure refreshes the part that the Layer B ultrasonic goes out Layer A with the gap (vblank) of figure;
2) part of Layer A and Layer B stack, the overlay mode that Layer A and Layer B are provided with according to " user interface " are carried out direct map brushing after the computing;
3) because Layer A is that initiatively Layer B is passive; So when map brushing, after a frame new images has come, the first brush Layer A Layer B of Layer A stack (and with), at the pixelblank of Layer A, hblank refreshes the layer B that exceeds the LayerA scope during vblank;
4) if at the pixelblank of a frame Layer A, hblank, during vblank, Layer B also brush, then in the gap of the layer of next frame A, continues to brush the layer B that is left;
Register:
When 1) writing down this frame Layer A map brushing, the position that Layer B refreshes on panel in real time;
When 2) writing down this frame Layer A map brushing, the physical location that reads among the Layer B " still image memory ";
Image display (Panel):
1) shows the image that " image brushing controller " conveying is come;
2) refer generally to the controller that can show, liquid crystal panel (lcd panel) for example, cathode-ray tube display (crt) or the like.
On the panel that ram (internal memory) arranged, panel can directly peek in ram according to frequency, and this being equivalent to directly given the ram of panel data, and layer b has only refreshed a part immediately, also can be stored in the part that refreshes among the ram earlier;
Not having the panel of ram, requirement is whole frame data, so till will having write data; After layer b has refreshed in fact; Just unifiedly see demonstration off, and if layer b has only refreshed a part, will wait for brushing fully to be over and issue panel again and show at next frame.
By on can know that the embodiment of the invention has following advantage:
1) because dynamic image requires to refresh in real time; And the requirement that still image refreshes is lower; So the requirement that the present invention uses according to reality, dynamic image preferentially refreshes in real time, and still image in the data slit of multiframe dynamic image, in the ranks refresh in crack, the frame gap; Thereby improved the efficient of map brushing, guaranteed the map brushing frame per second.
2), then use " register " Layer B0/Layer B1 in position that shows on the Panel and the physical location that reads of Layer B in " still image memory " if the gap L ayer B0/Layer B1 of present frame layer A has not refreshed; After next Layer A comes, repeat the order that this frame Layer A refreshes, and in the gap of layer A, refresh remaining Layer B0/Layer B1; View data " image brushing controller " obtains is input to " image display " and shows.
Therefore, the present invention is according to the characteristics of difference figure layer, and record position point when in each gap of a frame dynamic image, can not brushing Wan still image then brush at next frame, so still image can refresh in each gap of multiframe dynamic image.
3) whether the present invention detects each still image piece by " error detector " and superposes, and whether the detected image parameter has exceeded the size of panel, thereby corrects this type mistake.
4) user interface of the present invention can be used for selecting the used gap of map brushing, thereby gets rid of too small unserviceable gap.
The above only is a preferred implementation of the present invention; Should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; Can also make some improvement and retouching, these improvement and retouching also should be regarded as protection scope of the present invention.