Summary of the invention
It is a kind of based on alerting signal and automatically amplify the alarm method of alarm region that fundamental purpose of the present invention is to provide, and is intended to solve in prior art and can not occurs the technical matters of reporting to the police when abnormal at picture.
In order to realize goal of the invention, the invention provides a kind of alarm method based on alerting signal automatic amplification alarm region, it comprises the following steps:
Convert frame image information to digital signal;
Store described digital signal;
Conversion next frame the image information digital signal obtaining and the digital signal that the conversion former frame image information of storage before obtains are contrasted;
In the time that two groups of digital signals are different, judge that two frame pictures occur abnormal, generate alerting signal and report to the police.
Preferably, describedly convert frame image information to digital signal and comprise:
While receiving a frame image information, set up the first array to represent the full detail of this frame picture, the pixel information of each the value representative frame image in the first array;
While receiving next frame image information, set up the second array and represent the full detail of this next frame picture.
Preferably, the described digital signal that conversion next frame the image information digital signal obtaining and the conversion former frame image information of storing are before obtained contrasts and comprises:
The value of the value in the second array and the first array is contrasted.
Preferably, carry out the described digital signal that conversion next frame image information is obtained with before the digital signal that obtains of the conversion former frame image information of storage also comprise after contrasting:
Getting after the extraordinary image vegetarian refreshments of two frame pictures, calculate an abnormal area consistent with display screen shape according to extraordinary image vegetarian refreshments, and this abnormal area is amplified.
Preferably, described this abnormal area amplified and comprised:
Obtain the resolution of display screen and the resolution of input picture;
The horizontal starting point coordinate of the horizontal starting point coordinate of abnormal area and input picture is added, is amplified the horizontal starting point coordinate of image; The vertical starting point coordinate of abnormal area is added with the vertical starting point coordinate of input picture, is amplified the vertical starting point coordinate of image;
Horizontal starting point coordinate value by the pixel point value of image resolution ratio horizontal direction divided by abnormal area, obtain the enlargement factor of abnormal area horizontal direction, vertical starting point coordinate value by the pixel point value of image resolution ratio vertical direction divided by abnormal area, obtains the enlargement factor of abnormal area vertical direction.
It is a kind of based on alerting signal the automatic warning device that amplifies alarm region that the present invention also provides, and it comprises:
Modular converter, for converting frame image information to digital signal;
Memory module, for storing described digital signal;
Contrast module, for contrasting conversion next frame the image information digital signal obtaining and the digital signal that the conversion former frame image information of storage before obtains;
Alarm module, in the time that two groups of digital signals are different, judges that two frame pictures occur abnormal, generates alerting signal and reports to the police.
Preferably, described modular converter specifically for:
While receiving a frame image information, set up the first array to represent the full detail of this frame picture, the pixel information of each the value representative frame image in the first array;
While receiving next frame image information, set up the second array and represent the full detail of this next frame picture.
Preferably, described contrast module specifically for:
The value of the value in the second array and the first array is contrasted.
Preferably, said apparatus also comprises:
Computing and amplification module, for getting after the extraordinary image vegetarian refreshments of two frame pictures, calculate an abnormal area consistent with display screen shape according to extraordinary image vegetarian refreshments, and this abnormal area is amplified.
Preferably, described computing and amplification module specifically for:
Obtain the resolution of display screen and the resolution of input picture;
The horizontal starting point coordinate of the horizontal starting point coordinate of abnormal area and input picture is added, is amplified the horizontal starting point coordinate of image; The vertical starting point coordinate of abnormal area is added with the vertical starting point coordinate of input picture, is amplified the vertical starting point coordinate of image;
Horizontal starting point coordinate value by the pixel point value of image resolution ratio horizontal direction divided by abnormal area, obtain the enlargement factor of abnormal area horizontal direction, vertical starting point coordinate value by the pixel point value of image resolution ratio vertical direction divided by abnormal area, obtains the enlargement factor of abnormal area vertical direction.
Whether the present invention is by changing image information and former frame image information and a rear frame image information being contrasted, not only can analyze extremely, also can report to the police, and improved the performance of watch-dog, realizes at picture and occurs carrying out when abnormal automatic alarm.
Embodiment
Should be appreciated that specific embodiment described herein, only for explaining the present invention, is not intended to limit the present invention.
With reference to Fig. 1, it is the alarm method process flow diagram based on alerting signal automatic amplification alarm region in one embodiment of the invention.In the embodiment of the present invention, comprise the following steps based on alerting signal the automatic alarm method that amplifies alarm region:
Step S10, converts frame image information to digital signal; For example, can pass through SOC(System On Chip, system level chip) in the time of a frame image information input, convert this frame image information to digital signal.
Step S20, stores described digital signal; For example, can be by the digital signal that in watch-dog, Double Data Rate synchronous DRAM DDR storage is converted to.
Step S30, contrasts conversion next frame the image information digital signal obtaining and the digital signal that the conversion former frame image information of storage before obtains; For example, in the time that next frame image information is come in, convert equally digital signal to, and take out and be stored in the digital signal that the conversion previous frame image information of DDR the inside obtains and contrast.
Step S40, in the time that two groups of digital signals are different, judges that two frame pictures occur abnormal, generates alerting signal and reports to the police.
The present invention is by changing image information and former frame image information and a rear frame image information being contrasted, whether extremely, not only can analyze, also can report to the police, solve in prior art and can not occur the technical matters of reporting to the police when abnormal at picture, improved the performance of watch-dog.
Shown in Fig. 2, in the embodiment of the present invention, step S10 comprises:
Step S11, while receiving a frame image information, sets up the first array to represent the full detail of this frame picture, the pixel information of each the value representative frame image in the first array;
Step S12, while receiving next frame image information, sets up the second array and represents the full detail of this next frame picture.
Understand for convenient, suppose to have now a monitor, the physical resolution of this monitor is 1920x1080, and the resolution of input is 1280x1024, and the starting point of this resolution of 1280x1024 is (112,80).As everyone knows, the resolution of input is that the horizontal direction pixel that 1280x1024 inputs is 1280, and vertical direction pixel is 1024, and each pixel is made up of red, green, blue three parts of 8.The present invention to set up one be a[1280] array of [1024] carrys out the full detail of representing input images, each value in two-dimensional array represents the information of this pixel, as a[720] [360]=0xd7f, represent that coordinate is (720,360) the red value of this pixel is e, green is 7, and indigo plant is f.
Above-mentioned steps S30 comprises: the value of the value in the second array and the first array is contrasted.In the time of the input information of a frame picture, can set up above-mentioned array, and the information of this picture is stored into DDR the inside, in the time that next frame image information is come in, in like manner can set up array and represent the information of this picture, and contrast with each value of the array inside DDR, find out the two abnormal places of frame picture, extremely, replace the data of DDR the inside, then in liquid crystal screen display if do not had.If comparing result has extremely, the communication protocol that SOC can arrange by both sides, notice warning device is reported to the police.
In one embodiment, after carrying out above-mentioned steps S30, also comprise:
Getting after the extraordinary image vegetarian refreshments of two frame pictures, calculate an abnormal area consistent with display screen shape according to extraordinary image vegetarian refreshments, and this abnormal area is amplified.
After two frame pictures contrast, which pixel that can obtain two frame pictures is abnormal, the abnormal area that can calculate a rectangle (because liquid crystal display is rectangle) according to these abnormity point, when calculating after abnormal area, can be amplified to abnormal area full frame.
Shown in Fig. 3, in above-described embodiment, abnormal area is amplified and is comprised:
Step S31, obtains the resolution of display screen and the resolution of input picture;
Step S32, is added the horizontal starting point coordinate of the horizontal starting point coordinate of abnormal area and input picture, is amplified the horizontal starting point coordinate of image; The vertical starting point coordinate of abnormal area is added with the vertical starting point coordinate of input picture, is amplified the vertical starting point coordinate of image;
Step S33, horizontal starting point coordinate value by the pixel point value of image resolution ratio horizontal direction divided by abnormal area, obtain the enlargement factor of abnormal area horizontal direction, vertical starting point coordinate value by the pixel point value of image resolution ratio vertical direction divided by abnormal area, obtains the enlargement factor of abnormal area vertical direction.
For example, in previous embodiment, if the starting point of the abnormal area level calculating is 320, vertical direction starting point is 350, add the starting point (112 of 1280x1024 itself, 80), the horizontal direction starting point newly calculating is 112+320=432, the starting point of vertical direction is 80+350=430, the length of vertical direction abnormal level direction is 500, vertical direction width is 430, amplify by 500 and 300 effective length now, and do full screen display, whole abnormal area is amplified, horizontal and vertical enlargement factor is 1280/500, 1024/300.
The specific implementation process of algorithm is: if the physical resolution of screen is hout * wout, the length of horizontal direction is hout, and vertical direction width is wout.The resolution of input picture is hin*win, and cross-directional length is hin, and vertical direction width is win, and starting point is (hstart, vstart).After contrast module, calculate the starting point (hstart1 of the horizontal and vertical direction of abnormal area, vstart1), the abnormal big or small h1 that is respectively of horizontal and vertical direction, w1, the new starting point calculating becomes (hstart+hstart1, vstart+ vstart1), the enlargement factor of horizontal direction and vertical direction is respectively (hin/h1, win/w1).
The present invention also provides a kind of warning device based on alerting signal automatic amplification alarm region, and this warning device is built in monitor, above-mentioned based on alerting signal the automatic alarm method that amplifies alarm region for realizing.Shown in Fig. 4, in one embodiment, the warning device that the present invention is based on alerting signal automatic amplification alarm region comprises:
Modular converter 10, for converting frame image information to digital signal; For example, modular converter 10 can be arranged in SOC, in the time of a frame image information input, convert this frame image information to digital signal.
Memory module 20, for storing described digital signal; For example, memory module 20 can be the DDR in preceding method embodiment, the digital signal that storage is converted to.
Contrast module 30, for contrasting conversion next frame the image information digital signal obtaining and the digital signal that the conversion former frame image information of storage before obtains; For example, in the time that next frame image information is come in, convert equally digital signal to, and take out and be stored in the digital signal that the conversion previous frame image information of memory module 20 the insides obtains and contrast.
Alarm module 40, in the time that two groups of digital signals are different, judges that two frame pictures occur abnormal, generates alerting signal and reports to the police.
In one embodiment, modular converter 10 specifically for:
While receiving a frame image information, set up the first array to represent the full detail of this frame picture, the pixel information of each the value representative frame image in the first array;
While receiving next frame image information, set up the second array and represent the full detail of this next frame picture.
In the present embodiment, contrast module 30 specifically for: the value of the value in the second array and the first array is contrasted.
In a preferred embodiment, said apparatus also comprises:
Computing and amplification module 50, for getting after the extraordinary image vegetarian refreshments of two frame pictures, calculate an abnormal area consistent with display screen shape according to extraordinary image vegetarian refreshments, and this abnormal area is amplified.For example, after two frame pictures contrast, which pixel that can obtain two frame pictures is abnormal, computing and amplification module 50 calculate the abnormal area of a rectangle (because liquid crystal display is rectangle) according to these abnormity point, when calculating after abnormal area, abnormal area can be amplified to full frame.
In a preferred embodiment, computing and amplification module 50 specifically for:
Obtain the resolution of display screen and the resolution of input picture;
The horizontal starting point coordinate of the horizontal starting point coordinate of abnormal area and input picture is added, is amplified the horizontal starting point coordinate of image; The vertical starting point coordinate of abnormal area is added with the vertical starting point coordinate of input picture, is amplified the vertical starting point coordinate of image;
Horizontal starting point coordinate value by the pixel point value of image resolution ratio horizontal direction divided by abnormal area, obtain the enlargement factor of abnormal area horizontal direction, vertical starting point coordinate value by the pixel point value of image resolution ratio vertical direction divided by abnormal area, obtains the enlargement factor of abnormal area vertical direction.
For example, in previous embodiment, if the starting point of the abnormal area level calculating is 320, vertical direction starting point is 350, add the starting point (112 of 1280x1024 itself, 80), the horizontal direction starting point newly calculating is 112+320=432, the starting point of vertical direction is 80+350=430, the length of vertical direction abnormal level direction is 500, vertical direction width is 430, amplify by 500 and 300 effective length now, and do full screen display, whole abnormal area is amplified, horizontal and vertical enlargement factor is 1280/500, 1024/300.
The specific implementation process of algorithm is: if the physical resolution of screen is hout * wout, the length of horizontal direction is hout, and vertical direction width is wout.The resolution of input picture is hin*win, and cross-directional length is hin, and vertical direction width is win, and starting point is (hstart, vstart).After contrast module, calculate the starting point (hstart1 of the horizontal and vertical direction of abnormal area, vstart1), the abnormal big or small h1 that is respectively of horizontal and vertical direction, w1, the new starting point calculating becomes (hstart+hstart1, vstart+ vstart1), the enlargement factor of horizontal direction and vertical direction is respectively (hin/h1, win/w1).
These are only the preferred embodiments of the present invention; not thereby limit the scope of the claims of the present invention; every equivalent structure or conversion of equivalent flow process that utilizes instructions of the present invention and accompanying drawing content to do; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.