Image processing method that screen is seamless spliced and device thereof
Technical field
The present invention relates to a kind of image processing method of Mosaic screen, specifically be a kind of can be so that Mosaic screen be realized seamless spliced image processing method and device thereof.
Background technology
The lifting that Along with people's is transmitted demand to display message, the application of large scale display have spreaded all over every field such as public's demonstration, communications and transportation dispatch control, meteorological monitoring, the monitoring of electric power telecommunications, fire fighting monitoring commander, military commanding.
Existing Large Screen Display Technology is the mode through piling up mainly, and a plurality of display units are carried out combined and spliced demonstration.The advantage of Mosaic screen is to improve the systemic resolution that shows, increases display area, can realizes that entire display screen shows a complete picture; Also can open window etc. in the optional position of display screen; But also there is its shortcoming simultaneously, has tangible physical connection seam exactly in the junction of each display unit, when reality starts demonstration; Be presented as black surround, destroyed the whole structure of image.
Chinese invention patent application specification CN1688160A discloses splicing images displayed edge amalgamation method on a kind of large-screen; It is through becoming a plurality of subimages with a width of cloth picture segmentation; Each adjacent subimage is connected the marginal portion and has identical picture material; The marginal portion that will have same image content during projected image is overlapping, adopts optics (physics) modulation and electron gain to regulate simultaneously the brightness uniformity processing is carried out in the overlapping region.Yet, not enough below this method exists:
(1) causes partial pixel to lose at company's seam crossing easily through the method, and a sudden change occurs, can not realize good color transition at the boundary of two width of cloth subimages;
(2) this method needs earlier through the optical modulation operation, and then carries out electron gain and regulate operation, and gain-adjusted action need wherein is provided with adjusting manually, time and effort consuming not only, and do not have and also can't guarantee the precision of regulating.
Therefore, provide a kind of and can regulate gain automatically, and realize that effectively image processing method and device thereof that Mosaic screen is seamless spliced are technical issues that need to address in fact.
Summary of the invention
First technical problem that the present invention solves provides a kind ofly can regulate gain automatically, and effectively realizes the image processing method that Mosaic screen is seamless spliced.
Second technical problem that the present invention solves provides a kind ofly can regulate gain automatically, and effectively realizes the image processing apparatus that Mosaic screen is seamless spliced.
For solving first technical problem, the present invention adopts first technical scheme:
The image processing method that a kind of screen is seamless spliced is characterized in that may further comprise the steps:
S10: the image of taking and store each gray scale of Mosaic screen three primary colors; Three primary colors are meant red, blue, green three kinds of primary colours.During photographic images, let Mosaic screen show certain grayscale images of a certain primary colours earlier, and then take Mosaic screen and the image of clapping is preserved.
S20: set up each pixel of Mosaic screen and each locations of pixels corresponding relation of actual screen in the photographic images;
S30:, set up respectively and store the grey scale pixel value form of the image of each gray scale of three primary colors at the splicing seams near zone according to the image of each gray scale of position corresponding relation among the step S20 and the three primary colors among the step S10;
S40: the gray value in the grey scale pixel value form among the step S30 resets; And find the gray value corresponding gray scale level after resetting in the respective pixel position of each grayscale image of the corresponding primary colours of step S10; Then in the relevant position with the corresponding form of this gray scale write step S30; Make the closer to splicing seams the gradual transition that the gray value of pixel is high more;
S50: preserve the grey scale pixel value form after step S40 handles;
S60: from the form that step S50 preserves, isolate the data of corresponding each concatenation unit and be sent to each concatenation unit and show.
As one of improving: in said step S30, said splicing seams near zone is meant with the splicing seams to be that the width at center is the zone of 40-80 pixel wide.In general, the existing horizontally-spliced seam of Mosaic screen also has splicing seams longitudinally, so the splicing seams near zone both comprised horizontally-spliced seam near zone, also comprises longitudinal spliced seam near zone.
As two of improvement: in step S40, the formula that the gray value in the grey scale pixel value form is reset is:
K=A+L1*| (A-B)/L| wherein,
K representes the gray value after a certain pixel q1 resets;
A represent in two borders of said splicing seams near zone with pixel q1 distance border far away on the gray value of the nearest pixel q3 of q1;
B representes in two borders of said splicing seams near zone on the border with pixel q1 close together the gray value with the nearest pixel q2 of q1;
The pixel distance that L1 remarked pixel q1 and q3 are separated by;
The pixel distance that L remarked pixel q2 and q3 are separated by.
As three of improvement: in step S20, said corresponding relation is an one-to-one relationship.
For solving second technical problem, the present invention adopts second technical scheme:
The image processing apparatus that a kind of screen is seamless spliced is characterized in that comprising: filming apparatus, memory module, position corresponding relation module, splicing seams form module, image processing module and form separation module, wherein:
Filming apparatus and memory module are respectively applied for takes and each grayscale image of storage Mosaic screen three primary colors;
Position corresponding relation module is used for setting up each pixel of photographic images Mosaic screen and each pixel of actual screen;
Splicing seams form module is used for the data according to the image of each gray scale of three primary colors and position corresponding relation module, sets up the grey scale pixel value form of the image of each gray scale of storage three primary colors at the splicing seams near zone;
The gray value that image processing module is used for resetting the grey scale pixel value form resets; Make the closer to splicing seams; The gradual transition that the gray value of pixel is high more; Simultaneously find the gray value corresponding gray scale level form after resetting, then this gray scale is write in the relevant position of corresponding grey scale pixel value form of splicing seams form module in the respective pixel position of each grayscale image of corresponding primary colours;
The form separation module is used for the grey scale pixel value form of splicing seams form module isolated the data of corresponding each Mosaic screen unit and be sent to each Mosaic screen unit showing.
As one of improving: said splicing seams near zone is meant with the splicing seams to be that the width at center is the zone of 40-80 pixel wide.
As two of improvement: said image processing module to the formula that the gray value in the grey scale pixel value form resets is:
K=A+L1*|(A-B)/L|
Wherein,
K representes the gray value after a certain pixel q1 resets;
A represent in two borders of said splicing seams near zone with pixel q1 distance border far away on the gray value of the nearest pixel q3 of q1;
B representes in two borders of said splicing seams near zone on the border with pixel q1 close together the gray value with the nearest pixel q2 of q1;
The pixel distance that L1 remarked pixel q1 and q3 are separated by;
The pixel distance that L remarked pixel q2 and q3 are separated by.
As three of improvement: said position corresponding relation is an one-to-one relationship.
Compared with prior art, the beneficial effect of the present invention's first technical scheme and second technical scheme is:
(1) image of each gray scale of the present invention through taking Mosaic screen redness, green and blue three kinds of primary colours respectively with filming apparatus is analyzed, and realizes the colour brightness adjustment.Can reach automation fully, avoid to adjust through manual in the prior art, reduce the adjustment complexity.
(2) the present invention passes through in each gray scale of three kinds of primary colours the closer to jointing positions; The high more gradual transition of gray value of pixel is set, makes the place's brightness of splicing slit improve greatly, the concealed wire in splicing slit obviously brightens; Whole Mosaic screen is realized seamlessly transitting, and realizes the seamless spliced of screen.
(3) the splicing seams form among the present invention is only preserved the grey scale pixel value of jointing positions between the Mosaic screen unit, rather than preserve the grey scale pixel value of whole captured image, has reduced the read or write speed that data quantity stored has improved movement simultaneously.
Description of drawings
Fig. 1 is that the present invention takes the grayscale image sketch map;
Fig. 2 is that the present invention stores the grayscale image sketch map;
Fig. 3 is the splicing seams near zone sketch map of Mosaic screen of the present invention;
Fig. 4 is the A part enlarged diagram of Fig. 3.
Embodiment
The seamless spliced image processing method of screen of the present invention's first technical scheme may further comprise the steps:
S10: take and store the image of each gray scale of Mosaic screen three primary colors, as shown in Figure 1, Mosaic screen 102 is that the splicing display unit that 4 resolution are 1024*768 is spliced;
S20: set up each pixel of Mosaic screen and each locations of pixels corresponding relation of actual screen in the photographic images;
S30:, set up respectively and store the grey scale pixel value form of the image of each gray scale of three primary colors at the splicing seams near zone according to the image of each gray scale of position corresponding relation among the step S20 and the three primary colors among the step S1O;
S40: the gray value in the grey scale pixel value form among the step S30 resets; And find the gray value corresponding gray scale level after resetting in the respective pixel position of each grayscale image of the corresponding primary colours of step S10; Then in the relevant position with the corresponding form of this gray scale write step S30; Make the closer to splicing seams the gradual transition that the gray value of pixel is high more;
S50: preserve the grey scale pixel value form after step S40 handles;
S60: from the form that step S50 preserves, isolate the data of corresponding each concatenation unit and be sent to each concatenation unit and show.
Wherein, in step S10: three primary colors are meant red, blue, green three kinds of primary colours, and each primary colours have 256 gray scales, therefore need shooting will take 256*3=768 altogether and open image.As shown in Figure 1,101 is filming apparatus, and 102 is Mosaic screen.When photographic images, let Mosaic screen show certain grayscale image of a certain primary colours earlier, take Mosaic screen then and obtain the image of Mosaic screen under these primary colours and gray scale, and this image is preserved.Storage mode is as shown in Figure 2; The image of red the 256th gray scale of representing to take with R255.bmp of Mosaic screen; The image of green the 256th gray scale of the Mosaic screen that G255.bmp representes to take; The image of blue the 256th gray scale of the Mosaic screen that B255.bmp representes to take is so analogized.
Wherein, in step S20: each locations of pixels corresponding relation of each pixel of Mosaic screen and actual screen both can be an one-to-one relationship in the grayscale image, also can be one-to-many, or many-to-one relationship.For example: when the pixel that is arranged in image combination the 1025th row the 769th row, the pixel that is listed as with actual Mosaic screen the 1025th row the 769th is corresponding, and then both are one-to-one relationship.Again for example: be arranged in the pixel of image Mosaic screen the 1025th row the 769th row, it is corresponding being in actual Mosaic screen the 1025th row the 769th certain contiguous pixels zone of row with the center, then is the relation of one-to-many between the two.Again for example: when the position, center is in certain contiguous pixels zones of image the 1025th row the 769th row, when being corresponding, then be many-to-one relationship between the two with the pixel of actual Mosaic screen the 1025th row the 769th row.What yet this execution mode was taked is one-to-one relationship.Through grayscale image resolution is calibrated, the resolution that makes the resolution of these photos approach 2048*1536, the pixel and the pixel on the Mosaic screen that finally reach on the grayscale image are to concern one to one.
Wherein, In step S30:, set up the form of jointing positions grey scale pixel value between the Mosaic screen unit in three kinds of each grayscale images of primary colours of storage respectively according to the image of each gray scale of the position corresponding relation among the step S20 and three kinds of primary colours among the step S10.Wherein, between the Mosaic screen unit preferable range of the pixel wide of jointing positions 40-80 pixel wide.Like Fig. 3, shown in Figure 4, selecting the pixel wide of jointing positions between the Mosaic screen unit in this execution mode is 50 pixel wide.Set up three kinds of primary colours and 256 forms of every kind of primary colours respectively, the gray value of the pixel between the Mosaic screen unit of a kind of primary colours of each form stores in the image of a gray scale in 50 pixel wide of jointing positions.
Wherein, in step S40: the gray value to jointing positions pixel between the Mosaic screen unit of three kinds of each gray scales of primary colours resets, and sets formula to be: K=A+L1*| (A-B)/L|.
Below in conjunction with Fig. 3, Fig. 4 each parameter in the formula is described:
K representes the gray value after a certain pixel q1 resets;
A represent in two borders of said splicing seams near zone with pixel q1 distance border far away on the gray value of the nearest pixel q3 of q1;
B representes in two borders of said splicing seams near zone on the border with pixel q1 close together the gray value with the nearest pixel q2 of q1;
The pixel distance that L1 remarked pixel q1 and q3 are separated by;
The pixel distance that L remarked pixel q2 and q3 are separated by.
Illustrate the application of above-mentioned formula below.For example, in the image of R220.bmp, q1 is the pixel of the 760th row the 10th row, so; Q2 is the pixel of the 768th row the 10th row, and its gray value B is 150, and in the present embodiment, the jointing positions pixel wide is 50 pixels; Then, q3 is the pixel of the 718th row the 10th row, and its gray value A is 200, and L is 50; L1 is 760-718=42, substitution formula, gray value K=200+42*| (the 200-150)/50|=242 after can obtaining pixel q1 and resetting.Above-mentioned is example with horizontal slit, and the slit account form also in like manner is not described further at this longitudinally.Can know that from formula the gradual change amount is at L1, the gray value K after the bigger then pixel of L1 q1 resets is just big more; Promptly along with pixel the closer to the slit between the Mosaic screen unit; The gray value of pixel will be big more, makes the place's brightness of splicing slit improve greatly, and the concealed wire in splicing slit obviously brightens; Whole Mosaic screen is realized seamlessly transitting, and realizes the seamless spliced of screen.
After calculating the gray value after resetting, in the image of the corresponding primary colours of step S10, find the gray value corresponding gray scale level after resetting in the respective pixel position, in the relevant position with the corresponding form of this gray scale write step S30.For example; In the above-mentioned example; The gray value of q1 that calculates the pixel of the 760th row the 10th row after resetting is 242; The 760th row the 10th row location of pixels in these 256 images from R0.bmp to R255.bmp so just; Search gray value on this location of pixels and be 242 image, for example finding this image of R250.bmp gray value on this location of pixels is 242, then is written to 250 these gray scales in the corresponding form (promptly corresponding with the image of R220.bmp form) of step S30 and represents in the 760th row the 10th row location of pixels.
Wherein, in step S60: this isolation technics is a prior art, only need the data of corresponding each Mosaic screen unit be sent to each mosaic screen unit respectively, it is write movement show and get final product, and is not described further at this.
In view of the incidence relation between second technical scheme and first technical scheme, under the situation of first technical scheme being made detailed description, omit further specifying to second technical scheme.In addition; The foregoing description is a preferred implementation of the present invention; But execution mode of the present invention is not limited by the examples; Other any do not deviate from change, the modification done under spirit of the present invention and the principle, substitutes, combination, simplify, and all should be the substitute mode of equivalence, is included within protection scope of the present invention.