CN102752542A - Method for stacking video images and device of method - Google Patents

Method for stacking video images and device of method Download PDF

Info

Publication number
CN102752542A
CN102752542A CN2012102096724A CN201210209672A CN102752542A CN 102752542 A CN102752542 A CN 102752542A CN 2012102096724 A CN2012102096724 A CN 2012102096724A CN 201210209672 A CN201210209672 A CN 201210209672A CN 102752542 A CN102752542 A CN 102752542A
Authority
CN
China
Prior art keywords
pattern
character
video
data
chip
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
CN2012102096724A
Other languages
Chinese (zh)
Other versions
CN102752542B (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201210209672.4A priority Critical patent/CN102752542B/en
Publication of CN102752542A publication Critical patent/CN102752542A/en
Application granted granted Critical
Publication of CN102752542B publication Critical patent/CN102752542B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Controls And Circuits For Display Device (AREA)
  • Studio Circuits (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a method for stacking video images. The method comprises the following steps of: manufacturing stacked patterns by mapping software; orderly dividing test patterns according to a character dot matrix structure of a font library; generating font library data and stacking pattern data according to the order; generating the font library data to write into a character stacking chip; storing the stacked pattern data into a single chip; operating control program by the single chip; setting a work mode of the character stacking chip; writing the stacked pattern data into the character stacking chip by the single chip according to the order; and transferring the character dot matrixes to stack on the video image according to an index data order, thus obtaining the display effect of the stacked patterns on the video image. According to the invention, video image signals of a test picture are obtained by a video camera and stacked into the stacked pattern by the video stacking chip, and the position of the video camera on an adjusting bracket is adjusted, so the stacked patterns are overlapped with the test image, and a video camera coordinate system parameter which can be repeatedly used in engineering application is obtained. Compared with the prior art, the method has the advantages that the device is simple, the operation is easy and generalization and use are easy.

Description

A kind of method and device thereof of video image stack
Technical field
The present invention relates to a kind of method of video image stack, especially a kind of video image stacking method and the device thereof that can reuse the camera coordinate system parameter.
Background technology
Character adder is widely used in the video surveillance applications, is generally used for character informations such as stack time, place on the video image.Existing a plurality of semiconductor companies release special character overlap chip, like the upd6453 of NEC Corporation, the MB90092 of FUJITSU company.These chip characteristics are to produce character pattern, and the superposition image signal video superimpose then need adopt image mode to superpose, and character overlap chip can't directly apply to the superposition image signal video superimpose usually.
The multiple application of video system needs the resolution chart overlaying function, for example judges the distortion degree of camera lens, needs the resolution chart of real scene shooting and distortionless theoretical pattern to compare, and distortionless theoretical pattern need obtain through the resolution chart stack.For example in NI Vision Builder for Automated Inspection is used, the laboratory obtains the stack camera parameters, in practical applications, needs to reappear camera coordinates, adopts resolution chart stack way, can simplify the process of repetition camera coordinates again.
A kind of implementation based on the signal video frequency superimposer of pattern can adopt FPGA (or CPLD) to realize for the circuit of core, and its logic function adopts VHDL programming definition, adds complicated peripheral circuit; Vision signal is through synchronizing separator circuit; Field synchronization and row are inputed to FPGA synchronously, and FPGA reads superimposed image content and output according to synchronous sequence from ROM; With the raw video signal addition, output is superimposed with the vision signal of superposition image signal.Superimposed image content among the above-mentioned ROM is cured among the ROM after being handled by the test picture in advance.Adopt FPGA scheme shortcoming to be that software and hardware is complicated, whole cost is higher, and the easy deterioration of vision signal is not easy to obtain good performance.
Summary of the invention
The technical problem that the present invention will solve is, to the deficiency that present video image superimposer exists, design a kind of simple in structure, easy to operate, and can repeated application in the video image stacking method of engineering image making.
Hardware using single-chip microcomputer of the present invention, character overlap chip, single-chip microcomputer links to each other with the control interface of character overlap chip.
A kind of method of video image stack may further comprise the steps:
A, employing mapping software make the stack pattern;
B, test pattern is divided by the character pattern structure of character library in order, generated word-base data and stack pattern data in order;
C, generation word-base data write character overlap chip, and the pattern data that will superpose deposits single-chip microcomputer in;
D, single-chip microcomputer operation control program, the mode of operation of setting character overlap chip;
E, the single-chip microcomputer pattern data that will superpose writes character overlap chip in order, accesses character pattern by the index data order and is superimposed upon on the video image, and video image obtains the display effect of stack pattern.
As if the word-base data that duplicates, corresponding stack pattern data points to and the word-base data that repeats in said b step, saves that identical word-base data and numbers, and omits the word-base data of repetition.
Said word-base data adopts the EEPROM storage that is integrated in the chip MX7456, is stored in the word-base data in the EEPROM through modification, obtains the pattern signal that superposes.
Said stack pattern adopts VC++ to design program, and obtains character pattern from the BMP file of said test picture.
The present invention adopts video camera to obtain the video image signal of test picture; Be superimposed as the stack pattern through the video superimpose chip; Regulate video camera and regulating backing positions, make stack pattern and test image congruencing, obtaining can reusable camera coordinate system parameter in practical applications.It is simple compared with prior art to have equipment, processing ease, the advantage that is easy to promote the use of.
Description of drawings
Fig. 1 is a hardware configuration sketch map of the present invention.
Fig. 2 lifts the peripheral circuit diagram of a kind of character overlap chip of row for the present invention.
Fig. 3 is the screen explicit scheme of MX7456 character overlap chip.
Fig. 4 is that the dot matrix of MX7456 character overlap chip is arranged and storage format.
Fig. 5 is a MX7456 character overlap chip library stores structure.
Fig. 6 is stack pattern BMP file header and file part data sectional drawing.
Fig. 7 is a kind of design drawing of stack pattern.
Fig. 8 is a kind of resolution chart photo of stack pattern.
Fig. 9 is a video superimpose pattern displaying photo.
Embodiment
Below in conjunction with accompanying drawing embodiment of the invention structure and implementation method are described further.
As shown in Figure 1, the present invention includes a video camera 1, and test picture 2, adjusting support 3, a picture signal video superimpose device 4 and a video-frequency monitor.Video camera 1 is installed in to be regulated on the support 3; Video camera 1 obtains the video image signal of test picture 2; The view signal of output is through picture intelligence video superimpose device 4; Be superimposed with the stack pattern identical with testing picture 2 contents, through regulating camera position on the support 3, also the position of movable detection picture 2 makes stack pattern and test picture 2 overlaids.Adopt video camera stack method of patterning to obtain video camera coordinate parameter, in practical applications, can reuse the camera coordinate system parameter.
As shown in Figure 2; Picture signal video superimpose device 4 comprises interface microcontroller circuit JP2, video superimpose chip U1; MAX7456 is selected in this enforcement for use, and the peripheral circuit that connects interface microcontroller and video superimpose chip U1, the vision signal input P1 that video camera produces; Vision signal behind the stack pattern exports display to from P2, and its peripheral circuit and Single-chip Controlling interface circuit all are that known circuit needn't detail.
The embodiment of the invention adopts the beautiful character type video superimpose chip MAX7456 that believes (Maxim) company.Similar on the principle with upd6453.MAX7456 inner integrated synchronizing separator circuit, output driving circuit, screen character show supercircuit (OSD).MAX7456 shows that the character in the character library adopts common 12*18 point mode, and word-base data adopts the EEPROM storage, and the user can obtain the pattern signal that superposes through revising word-base data.
The generation of word-base data, store and call:
The screen explicit scheme of MAX7456 is to organize according to the character arrangement mode, and totally 30 row 16 are gone, and a screen shows 480 characters at most, and is corresponding one by one by 480 apparent internal memories of unit screen, is arranged in order by sequence number, as shown in Figure 3.
In the display design of MAX7456, screen saves as 480 unit in showing, and corresponding to 480 characters of demonstration all over the screen, each screen shows internal storage location and comprises 2 bytes one by one, and low byte is the coding of character display, points to character position in the character library, and high byte is a display properties.Display properties comprises display background, whether whether light and shade is reversed, glimmered.
The character library of MAX7456 adopts the EEPROM storage that is integrated in chip internal, can pass through program rewriting, and the outage content is not lost.Character library can be stored 256 characters at most, and each character pattern takies 64 bytes in the character library, 54 bytes of actual use.2 (bit) expression is adopted in the demonstration of each point, if certain 1: 2 is 00, representes that this is for black; 1: 2 is 10, representes that this is white; 1: 2 is 01 or 11, and then this is transparent, i.e. this position overlapped information not.Every row 12 points of character in the character library need to store with 3 bytes (byte); A character 18 is gone totally, then needs 54 bytes (64 bytes of actual employing), stores a character pattern.A character storage format is as shown in Figure 4.The library stores structure is as shown in Figure 5.
According to the display format of MAX7456, the stack pattern shows 360 points according to level, shows that vertically design at 288, adopts element figure, comprises horizontal line, vertical line, oblique line and circle, and is as shown in Figure 7.Character pattern display format according to MAX7456 is cut apart, and promptly 12 vertical 18 points of level convert superimposed image to character pattern, constitutes the MAX7456 character library.One screen stack pattern obtains 480 character patterns, and MAX7456 character library capacity is 256, if the character pattern after directly will changing constitutes the MAX7456 character library, obviously capacity is not enough.Character pattern is analyzed comparison, have several same character pattern.For identical character pattern, store one, screen shows internal memory can call same character library dot matrix, shows.Thereby compressed information Chinese library makes it to constitute effective MAX7456 character library less than 256 character patterns.
The stack pattern is made through mapping software (AutoCad, CoreDraw, Photoshop etc.), and with reference to the MAX7456 display parameters, setting form is the gray scale bmp image of 360*288.
Adopt VC++ to design program, obtain character pattern from the BMP file of stack pattern.It is following to analyze the BMP file format.
The BMP file is made up of 4 parts:
Bitmap file head (bitmap-file header);
Message bit pattern head (bitmap-information header);
Color table (color table);
Color dot array data (bits data).
The BMP file structure is following:
typedef?struct?tagBITMAPFILEHEADER{
WORD bfType; The type of // bitmap file is BM
DWORD bfSize; The size of // bitmap file, byte
WORD bfReserved1; // bitmap file reserved word is 0
WORD bfReserved2; // bitmap file reserved word is 0
DWORD bfOffBits; The original position of // data bitmap
The side-play amount of // file header is represented, byte
}?BITMAPFILEHEADER;
Stack pattern BMP file header sectional drawing is following:
0x42 0x4D is the American Standard Code for Information Interchange of BM, is the BMP file identification.0x38 0x99 0x01 0x00 is a file size, and 0x36 0x04 is the data bitmap side-play amount.Because the stack pattern is the gray level image form, therefore directly begin to fetch data to offset location, promptly be view data.This partial data form is as shown in Figure 6.
BMP file information head BITMAPINFOHEADER structure is following:
typedef?struct?tagBITMAPINFOHEADER{
DWORD biSize; The shared byte number of // this structure
LONG biWidth; The width of // bitmap is a unit with the pixel
LONG biHeight; The height of // bitmap is a unit with the pixel
WORD biPlanes; The rank of // target device is necessary for 1
WORD biBitCount//required the figure place of each pixel must be 1 (double-colored),
// 4 (16 looks), one of 8 (256 looks) or 24 (RGBs)
DWORD biCompression; // bitmap compression type must be 0 (not compressing),
One of // 1 (BI_RLE8 compression type) or 2 (BI_RLE4 compression types)
DWORD biSizeImage; The size of // bitmap is a unit with the byte
LONG biXPelsPerMeter; // bitmap horizontal resolution, every meter pixel count
LONG biYPelsPerMeter; // bitmap vertical resolution, every meter pixel count
DWORD biClrUsed; Number of colours in the color table of the actual use of // bitmap
DWORD biClrImportant; Important number of colours in the // bitmap procedure for displaying
}?BITMAPINFOHEADER;
Analyze the BMP fileinfo; 0x28 0x00 0x00 0x00 representes that the shared byte number of this structure is 40; 0x68 0x01 0x00 0x00 representes that the width of bitmap is 360 pixels; 0x20 0x01 0x00 0x00 representes that the height of bitmap is 288 pixels, and width, process highly that the employing program is obtained bitmap are following.
BITMAPINFOHEADER?bmiHeader;
if(file.Read((LPSTR)&bmiHeader,sizeof(bmiHeader))?!=sizeof(bmiHeader))
Return; // obtain size information, and show
int?bmWidth=bmiHeader.biWidth;
int?bmHeight=bmiHeader.biHeight;
The pLmbuf [] that defines arrays reads in the BMP document image in this array.
Each pixel of gray scale BMP image file transfers the then necessary binaryzation of MAX7456 character library to by a byte representation, and threshold value can be made as 0x80.Certain some transfer algorithm can be represented with following C statement:
if?(?pLmbuf[m]?<?0x80?)
HZTable[n][k*3]?=?HZTable[n][k*3]?&?0xbf;?//1011?1111
In the program, for less than threshold data, assert that this pixel of BMP image is a stain, white point superposes on video image; Otherwise this point shows external video signal content for the brocken spectrum of acquiescence.
In the above-mentioned statement, array pLmbuf [m] is the view data of being read in by gray scale BMP file, organizes with the array form.Array index m is the position of point, obtains through cycle calculations.
Definition two-dimensional array HZTable [] [] storage character library dot matrix, the HzSeek [] that defines arrays shows internal memory for screen, and array HzSeek [] has 480 elements.Every newly-generated character pattern, the character pattern that generates before with this character pattern compares one by one, if identical, does not then take in character library, shows array HzSeek [] corresponding element at screen and writes the character pattern array numbering that generates before.The program that this algorithm is realized is following:
for(jj=0;jj<n;jj++)
{ b_same?=?1;
for(kk=0;kk<54;kk++)
{
if?(HZTable[n][kk]!=HZTable[jj][kk])?{b_same?=?0;?break;}c
}
if?(b_same?==?1)?break;
}
Computing generates word-base data and shows the array content with screen, as the Single-chip Controlling routine data of MAX7456.It is following that screen shows memory array HzSeek [] partial content
unsigned?char?HzSeek[]={
0x00,0x01,0x02,0x02,0x02,0x02,0x02,0x03,0x02,0x02,0x02,0x02,0x02,…
}
HzSeek [0], HzSeek [1], HzSeek [2] adopt respectively and are numbered 0,1,2 character patterns in the character library; HzSeek [3], HzSeek [2], HzSeek [5], HzSeek [6] displaying contents are identical with HzSeek [2]; Therefore also adopting font number is 2 character pattern; Thereby compressed character library, the image character library after the compression comprises 210 character patterns.
Utilize above-mentioned 210 character pattern data and 480 screens to show array, write the Single-chip Controlling program, rewrite the character library content among the EEPROM, and one by one the character library dot matrix of correspondence is being shown according to the apparent array of screen.Obtain the result of Fig. 9, white line shows content for screen, and black line is the actual photographed image, and adjustment video camera seat in the plane makes stack pattern and real image overlapping, thereby makes the superposition of data recycling, and makes the machine vision applications system have interchangeability.

Claims (5)

1. the method for video image stack is characterized in that may further comprise the steps:
A, employing mapping software make the stack pattern;
B, test pattern is divided by the character pattern structure of character library in order, generated word-base data and stack pattern data in order;
C, generation word-base data write character overlap chip, and the pattern data that will superpose deposits single-chip microcomputer in;
D, single-chip microcomputer operation control program, the mode of operation of setting character overlap chip;
E, the single-chip microcomputer pattern data that will superpose writes character overlap chip in order, accesses character pattern by the index data order and is superimposed upon on the video image, and video image obtains the display effect of stack pattern.
2. the method for a kind of video image stack according to claim 1; It is characterized in that in said b step if the word-base data that duplicates; Corresponding stack pattern data points to and the word-base data that repeats, and saves that identical word-base data numbering, omits the word-base data of repetition.
3. the method for a kind of video image stack according to claim 1 is characterized in that said word-base data adopts the EEPROM storage that is integrated in the chip MX7456, is stored in the word-base data in the EEPROM through modification, obtains the pattern signal that superposes.
4. the method for a kind of video image stack according to claim 1 is characterized in that said stack pattern adopts VC++ to design program, and obtains character pattern from the visual BMP file of said test.
5. the used hardware of a kind of video image stacking method according to claim 1; Its characteristic comprises a video camera (1), a test picture (2), an adjusting support (3), a picture signal video superimpose device (4) and a video-frequency monitor; Video camera (1) is installed in to be regulated on the support (3); Go up camera position through regulating support (3), make stack pattern and test picture (2) overlaid.
CN201210209672.4A 2012-06-25 2012-06-25 Method for stacking video images and device of method Expired - Fee Related CN102752542B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210209672.4A CN102752542B (en) 2012-06-25 2012-06-25 Method for stacking video images and device of method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210209672.4A CN102752542B (en) 2012-06-25 2012-06-25 Method for stacking video images and device of method

Publications (2)

Publication Number Publication Date
CN102752542A true CN102752542A (en) 2012-10-24
CN102752542B CN102752542B (en) 2015-07-08

Family

ID=47032423

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210209672.4A Expired - Fee Related CN102752542B (en) 2012-06-25 2012-06-25 Method for stacking video images and device of method

Country Status (1)

Country Link
CN (1) CN102752542B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2826874Y (en) * 2005-08-16 2006-10-11 湖南安通科技发展有限公司 Multipath living video character superimposing apparatus
CN201008192Y (en) * 2007-02-09 2008-01-16 杨群峰 Video capture stacking device for bill counter

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2826874Y (en) * 2005-08-16 2006-10-11 湖南安通科技发展有限公司 Multipath living video character superimposing apparatus
CN201008192Y (en) * 2007-02-09 2008-01-16 杨群峰 Video capture stacking device for bill counter

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
张志华等: "基于MAX7456的视频字符叠加系统设计", 《2009通信理论与技术新发展——第十四届全国青年通信学术会议论文集》 *
潜继成等: "视频叠加图形的设计与实现", 《2008系统仿真技术及其应用学术会议论文集》 *
陈毅等: "基于MAX7456的视频电子分划叠加系统设计", 《电子科技》 *

Also Published As

Publication number Publication date
CN102752542B (en) 2015-07-08

Similar Documents

Publication Publication Date Title
US10554882B2 (en) Panoramic camera and photographing method thereof
JP5353393B2 (en) Image processing apparatus and image processing method
CN102929572B (en) A kind of realize the seamless spliced method of the many projections of giant-screen and splicing fusion device
CN108848354B (en) VR content camera system and working method thereof
US11183105B2 (en) Display panel and device, image processing method and device, and virtual reality system
CN106664357A (en) Imaging apparatus, imaging-displaying apparatus, and control method thereof
CN105872496A (en) Ultrahigh-definition video fusion method
CN107203966A (en) A kind of coloured image synthetic method and device
CN109801279A (en) Object detection method and device, electronic equipment, storage medium in image
CN116760937B (en) Video stitching method, device, equipment and storage medium based on multiple machine positions
CN100437746C (en) Character display apparatus, character display method, character display program, and recording medium
CN102752542A (en) Method for stacking video images and device of method
CN106233278A (en) Segment for image creates view data
CN103458196A (en) Image composing apparatus of around view monitor system and image composing method thereof
CN111508447A (en) Image time sequence control circuit of grating type naked eye 3D liquid crystal screen based on FPGA
US20230056459A1 (en) Image processing device, method of generating 3d model, learning method, and program
CN114788266B (en) Method, device and system for analyzing and displaying video color gamut and computer equipment
JP6352875B2 (en) Marker generation method, marker decoding method, marker decoding device, and marker reading device
CN106791275B (en) A kind of image event detection marker method and system
CN101742081B (en) Image stabilizer
CN102628933A (en) Data processing and imaging method for multi-frequency microwave radiometer
CN115346124B (en) Method, device and equipment for rice mapping and readable storage medium
CN101588514B (en) Method for processing three dimensional images
CN115862506B (en) Dot screen method, image signal processing apparatus, and storage medium
US20240114118A1 (en) Multi-Viewpoint Image Processing System and Method Thereof

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150708

Termination date: 20180625