CN107886534A - A kind of method and device of recognition target image size - Google Patents

A kind of method and device of recognition target image size Download PDF

Info

Publication number
CN107886534A
CN107886534A CN201711083473.2A CN201711083473A CN107886534A CN 107886534 A CN107886534 A CN 107886534A CN 201711083473 A CN201711083473 A CN 201711083473A CN 107886534 A CN107886534 A CN 107886534A
Authority
CN
China
Prior art keywords
pixel dimension
target image
image
pixel
setting
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.)
Pending
Application number
CN201711083473.2A
Other languages
Chinese (zh)
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.)
Beijing Luxing New Road Technology Co Ltd
Original Assignee
Beijing Luxing New Road 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 Beijing Luxing New Road Technology Co Ltd filed Critical Beijing Luxing New Road Technology Co Ltd
Priority to CN201711083473.2A priority Critical patent/CN107886534A/en
Publication of CN107886534A publication Critical patent/CN107886534A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Abstract

The present invention proposes a kind of method of recognition target image, and the average gray of the image-region in image in addition to target image is calculated first;It is then determined that the grey scale pixel value in each pixel dimension of the target image occupied by the setting pixel dimension of image;According to the gray value of the pixel in the average gray and each pixel dimension, the pixel dimension quantity that target image occupies is calculated;Finally according to target image pixel dimension quantity occupied on the setting pixel dimension of image, and actual size of the shooting area corresponding to image in the vertical direction of setting pixel dimension, actual size of the target image in the vertical direction of setting pixel dimension is calculated.Above-mentioned identification process, the gray value of image-region around target image and target image is made full use of to calculate the actual size of target image, relative to target image actual size is calculated according to target image gray value merely, the degree of accuracy is higher.

Description

A kind of method and device of recognition target image size
Technical field
The present invention relates to image identification technical field, more particularly to a kind of method and device of recognition target image size.
Background technology
Image is typically to be taken pictures what is obtained to specific objective, the image comprising the target.When we observe a width figure As in target image when where can find target image from image quickly because the feature of objective area in image Obvious difference be present with the feature of surrounding other objects, from pixel dimension, grey scale pixel value and the week of target image The gray value for enclosing other pixels is different.
We can regard an image as one two-dimentional coordinate system, and pixel is the least unit of the coordinate system, In the case of the actual size of shooting area represented by our known images, we can be calculated what each pixel represented Actual size, further according to occupied number of pixels of the target image under the coordinate system, we just can easily judge The size of image object.
The above method is usually the then recognition target image as the number of pixels occupied by manually directly counting target image Size.But because pixel grey scale transition be present in the fringe region of target image, cause identification to target image pixel and Count it is not accurate enough, so as to which identification misalignment to target image size can be caused.
The content of the invention
The defects of based on above-mentioned prior art and deficiency, the present invention propose a kind of method and dress of recognition target image size Put, be capable of the size of more accurately recognition target image.
In order to achieve the above object, the present invention proposes following technical scheme:
A kind of method of recognition target image size, including:
The average gray of image-region in addition to target image is calculated in image;
Determine the picture in the target image each pixel dimension occupied on the setting pixel dimension of described image The gray value of element;
It is each according to occupied by the average gray and the target image on the setting pixel dimension of described image The gray value of pixel in individual pixel dimension, it is shared on the setting pixel dimension of described image that the target image is calculated According to pixel dimension quantity;
According to target image pixel dimension quantity occupied on the setting pixel dimension of described image, Yi Jisuo Actual size of the shooting area corresponding to image in the vertical direction of the setting pixel dimension is stated, the target is calculated Actual size of the image in the vertical direction of the setting pixel dimension.
Preferably, the gray value of the pixel according in the average gray and each pixel dimension, calculate Target image pixel dimension quantity occupied on the setting pixel dimension of described image is obtained, including:
Target image picture occupied on the setting pixel dimension of described image is calculated according to below equation Plain number of dimensions:
Wherein, n represents target image pixel dimension quantity occupied on the setting pixel dimension of described image; I represents target image pixel dimension occupied on the setting pixel dimension of described image;aiRepresent the target figure As the gray value of the pixel in occupied each pixel dimension on the setting pixel dimension of described image;Represent the figure The average gray of image-region as in addition to the target image.
Preferably, the pixel dimension occupied on the setting pixel dimension of described image according to the target image Quantity, and actual size of the shooting area corresponding to described image in the vertical direction of the setting pixel dimension, are calculated Actual size of the target image in the vertical direction of the setting pixel dimension is obtained, including:
Reality of the target image in the vertical direction of the setting pixel dimension is calculated according to equation below Size:
Wherein, w_c represents actual size of the target image in the vertical direction of the setting pixel dimension;N tables Show target image pixel dimension quantity occupied on the setting pixel dimension of described image;W represents described image pair Actual size of the shooting area answered in the vertical direction of the setting pixel dimension;NwDescribed image is in the setting pixel Pixel quantity in the vertical direction of dimension.
Preferably, each pixel for determining that the target image is occupied on the setting pixel dimension of described image The gray value of pixel in dimension, including:
Determine respectively in the target image each pixel dimension occupied on the setting pixel dimension of described image Pixel average gray value.
A kind of device of recognition target image size, including:
First computing unit, for the average gray of the image-region in addition to target image to be calculated in image;
Gray value determining unit, for determine the target image on the setting pixel dimension of described image it is occupied The gray value of pixel in each pixel dimension;
Second computing unit, for according to the average gray and the target image described image setting pixel The gray value of pixel in dimension in occupied each pixel dimension, is calculated the target image setting in described image Determine pixel dimension quantity occupied on pixel dimension;
3rd computing unit, for according to target image picture occupied on the setting pixel dimension of described image Plain number of dimensions, and actual chi of the shooting area corresponding to described image in the vertical direction of the setting pixel dimension It is very little, actual size of the target image in the vertical direction of the setting pixel dimension is calculated.
Preferably, second computing unit is according to the pixel in the average gray and each pixel dimension Gray value, the target image is calculated in pixel dimension quantity occupied on the setting pixel dimension of described image, It is specifically used for:
Target image picture occupied on the setting pixel dimension of described image is calculated according to below equation Plain number of dimensions:
Wherein, n represents target image pixel dimension quantity occupied on the setting pixel dimension of described image; I represents target image pixel dimension occupied on the setting pixel dimension of described image;aiRepresent the target figure As the gray value of the pixel in occupied each pixel dimension on the setting pixel dimension of described image;Represent the figure The average gray of image-region as in addition to the target image.
Preferably, the 3rd computing unit is according to shared by the target image on the setting pixel dimension of described image According to pixel dimension quantity, and shooting area corresponding to described image it is described setting pixel dimension vertical direction on reality Border size, the target image is calculated in the actual size in the vertical direction of the setting pixel dimension, it is specific to use In:
Reality of the target image in the vertical direction of the setting pixel dimension is calculated according to equation below Size:
Wherein, w_c represents actual size of the target image in the vertical direction of the setting pixel dimension;N tables Show target image pixel dimension quantity occupied on the setting pixel dimension of described image;W represents described image pair Actual size of the shooting area answered in the vertical direction of the setting pixel dimension;NwDescribed image is in the setting pixel Pixel quantity in the vertical direction of dimension.
Preferably, the gray value determining unit determines target image institute on the setting pixel dimension of described image During the gray value of the pixel in each pixel dimension occupied, it is specifically used for:
Determine respectively in the target image each pixel dimension occupied on the setting pixel dimension of described image Pixel average gray value.
The method of recognition target image proposed by the present invention, the image in addition to target image in image is calculated first The average gray in region;It is then determined that each picture that the target image is occupied on the setting pixel dimension of described image The gray value of pixel in plain dimension;Secondly according to the gray scale of the pixel in the average gray and each pixel dimension Value, target image pixel dimension quantity occupied on the setting pixel dimension of described image is calculated;Last root It is corresponding according to target image pixel dimension quantity occupied on the setting pixel dimension of described image, and described image Shooting area it is described setting pixel dimension vertical direction on actual size, the target image is calculated described Set the actual size in the vertical direction of pixel dimension.In above-mentioned calculating process, target image and target are made full use of The gray value of image peripheral image-region calculates the actual size of target image, based on merely according to target image gray value Target image actual size is calculated, the degree of accuracy is higher.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing There is the required accompanying drawing used in technology description to be briefly described, it should be apparent that, drawings in the following description are only this The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis The accompanying drawing of offer obtains other accompanying drawings.
Fig. 1 is a kind of schematic flow sheet of the method for recognition target image size provided in an embodiment of the present invention;
Fig. 2 is a kind of gray scale schematic diagram of pavement crack image provided in an embodiment of the present invention;
Fig. 3 is a kind of structural representation of the device of recognition target image size provided in an embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, rather than whole embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained every other under the premise of creative work is not made Embodiment, belong to the scope of protection of the invention.
The embodiment of the invention discloses a kind of method of recognition target image size, shown in Figure 1, this method includes:
S101, the average gray that image-region in addition to target image is calculated in image;
Specifically, technical scheme of the embodiment of the present invention after recognizing target image from image, calculates The actual size of above-mentioned target image.First, the embodiment of the present invention is calculated in above-mentioned image, the image district in addition to target image The average gray of all pixels in domain.
It should be noted that if above-mentioned image is coloured image, step of embodiment of the present invention S101 also includes to upper The pretreatment of image is stated, above-mentioned image is such as converted into gray level image, has carried out denoising etc..
For example, crack technical scheme of the embodiment of the present invention being applied in the pavement crack image shown in identification Fig. 2 During width, when it is crack area to confirm the 1-6 row pixel marked in image, it is calculated in image shown in Fig. 2 removes first The average gray of all pixels outside 1-6 row pixels, the average gray being calculated are expressed as
S102, determine in the target image each pixel dimension occupied on the setting pixel dimension of described image Pixel gray value;
Specifically, above-mentioned setting pixel dimension, refer to a certain pixel orientation of the above-mentioned image of setting of the embodiment of the present invention, Such as pixel column, pixel column, or the pixel orientation arbitrarily determined.Each pixel dimension that target image occupies, refers to target figure As the pixel of occupied pixel column, pixel column, or any direction.In this step, each pixel dimension that target image occupies Degree, it is the pixel dimension occupied by the target image of artificial naked eyes judgement, is not eventually for calculating object region chi Very little pixel dimension.The embodiment of the present invention further determines that target it is determined that after each pixel dimension occupied by target image The gray value of pixel of the image in occupied each pixel dimension.
For example, the crack described in Fig. 2 occupies the 1-6 row pixels indicated in image, then according to step S102, crack is determined The gray value of pixel in shown 1-6 row in fig. 2.
Optionally, in another embodiment of the present invention, the setting for determining the target image in described image The gray value of pixel on pixel dimension in occupied each pixel dimension, including:
Determine respectively in the target image each pixel dimension occupied on the setting pixel dimension of described image Pixel average gray value.
Specifically, after the pixel dimension occupied by target image is determined, possible target image is in occupied a certain picture The gray value of pixel in plain dimension is incomplete same, and now, target image is calculated in the pixel in the embodiment of the present invention Pixel average gray value, the gray value as pixel of the target image in the pixel dimension.According to above-mentioned computational methods, The pixel in target image each pixel dimension occupied on setting pixel dimension can further be calculated respectively Average gray value.
For example, the crack in Fig. 2 occupies the 1-6 row pixels in image, it is assumed that each picture of the crack in the 5th row pixel The gray value of element is not all the same, then the average gray value of all pixels of the crack in the 5th row pixel is calculated, as crack In the gray value of the 5th row pixel.
S103, according to occupied by the average gray and the target image on the setting pixel dimension of described image Each pixel dimension in pixel gray value, the target image is calculated on the setting pixel dimension of described image Occupied pixel dimension quantity;
Specifically, due to gray scale be present between the grey scale pixel value around the gray value and target image of target image pixel The pixel of transition, especially target image edge, its gray value are likely to be at around target image gray value and target image Between background image gray value, therefore when the pixel dimension quantity occupied by manual identified target image, such as calculate target figure During as occupied pixel column or pixel column as, these edge pixels may be regarded to target image pixel, it is also possible to by these sides Edge pixel regards background image pixels as, and can vary with each individual.Therefore, target image is visually observed according to traditional direct labor Occupied pixel dimension, there can be larger error for these reasons.
The embodiment of the present invention is summarized by lot of experiments and arrived, the gray value of target image pixel, with picture around target image Between the average gray of element, typically all there is significant difference, therefore be easier accurately from surrounding pixel average gray Target image gray value is identified, so as to more accurately determine the pixel dimension occupied by target image from image.Example Such as, for the pavement crack image shown in Fig. 2, studied and found by the collection of fracture surrounding pixel gray scale, crack pixel Gray scale is all higher than the average gray of surrounding pixel, therefore, is put down by comparing calculation crack grey scale pixel value and surrounding pixel gray scale Average, it may be determined that the pixel column occupied by crack.
Based on above-mentioned theory, the embodiment of the present invention passes through mathematical formulae, setting picture of the combining target image in above-mentioned image The gray value of pixel in plain dimension in occupied each pixel dimension, and the figure in above-mentioned image in addition to target image As the average gray of pixel, target image pixel dimension number occupied on the setting pixel dimension of above-mentioned image is calculated Amount.
It is appreciated that each pixel dimension that above-mentioned icon image is occupied on the setting pixel dimension of above-mentioned image, It is the pixel dimension occupied by by artificial macroscopic target image, and in fact, the pixel occupied by target image is tieed up It is exactly accurately these pixel dimensions that degree, which may not be, therefore can have error.And the embodiment of the present invention is seen in artificial naked eyes On the basis of the target image observed each pixel dimension occupied on setting pixel dimension, further via mathematics The mode of calculating, calculate occupied by target image, more accurate pixel dimension quantity.Target image chi is calculated for follow-up It is very little, computational accuracy can be improved.
Optionally, in another embodiment of the present invention, it is described according to the average gray and each pixel The gray value of pixel in dimension, target image picture occupied on the setting pixel dimension of described image is calculated Plain number of dimensions, including:
Target image picture occupied on the setting pixel dimension of described image is calculated according to below equation Plain number of dimensions:
Wherein, n represents target image pixel dimension quantity occupied on the setting pixel dimension of described image; I represents target image pixel dimension occupied on the setting pixel dimension of described image;aiRepresent the target figure As the gray value of the pixel in occupied each pixel dimension on the setting pixel dimension of described image;Represent the figure The average gray of image-region as in addition to the target image.
Specifically, clearance lot of experiments of the embodiment of the present invention is drawn, target image is calculated in setting picture according to above-mentioned formula The pixel dimension quantity that plain dimension occupies, its results contrast are accurate.
For example, the calculating for the fracture width in the pavement crack image shown in Fig. 2, is calculated in Fig. 2 removes first The average gray of the pixel outside 1-6 row pixels occupied by the pixel of crack is1-6 row pixel of the crack pattern as occupied by In, the gray value of each column pixel is ai, wherein i=1,2,3,4,5,6.Above-mentioned each parameter is substituted into above-mentioned formula, can be calculated Go out crack occupied pixel columns n in the picture.
It is appreciated that with reference to above-mentioned technical proposal, the target image in image can be calculated shared by any pixel dimension According to pixel dimension number, such as calculate pixel column, pixel column etc. that image object occupies.
S104, the pixel dimension quantity according to occupied by the target image on the setting pixel dimension of described image, And actual size of the shooting area corresponding to described image in the vertical direction of the setting pixel dimension, institute is calculated State actual size of the target image in the vertical direction of the setting pixel dimension.
It is that obtained image is shot to actual place, wherein wrapping specifically, the image handled by the embodiment of the present invention Containing the target object interested in place.When being shot to actual place, it may be determined that the reality of captured actual place Size, include the size of any direction.Such as the width (being represented with pixel count) for the image for shooting to obtain represents the actual field of shooting The lateral length on ground;The height (being represented with pixel count) of image represents the vertical extension of the actual place of shooting.
Further, the wide and high pixel count of shooting image, and corresponding lateral length and vertical length specify that After degree, the physical length determined representated by each pixel wide and high in image can be calculated.Specific algorithm is:Use a direction Physical length divided by the direction corresponding to image pixel number (pixel dimension i.e. vertical with the direction), as the direction is each The physical length that pixel represents.For example, for the pavement crack image shown in Fig. 2, it is assumed that known shooting area is a length of M, wide For N rectangular region, and known Fig. 2 includes K row pixel (having K pixel column) altogether, then it was determined that each row pixel Size be M/K.
Further, target image pixel dimension occupied on setting pixel dimension is being determined according to the method described above Number of degrees amount, and actual chi of the shooting area corresponding to image in the vertical direction of the pixel dimension of above-mentioned setting is determined It is very little, and after the actual size of each pixel dimension of above-mentioned image is calculated, the embodiment of the present invention is every with above-mentioned image The actual size of one pixel dimension is multiplied by target image pixel dimension quantity occupied on setting pixel dimension, you can obtains Actual size of the target image in the vertical direction of above-mentioned setting pixel dimension.
Optionally, in another embodiment of the present invention, it is described according to the target image described image setting Occupied pixel dimension quantity on pixel dimension, and shooting area corresponding to described image is in the setting pixel dimension Actual size in vertical direction, reality of the target image in the vertical direction of the setting pixel dimension is calculated Size, including:
Reality of the target image in the vertical direction of the setting pixel dimension is calculated according to equation below Size:
Wherein, w_c represents actual size of the target image in the vertical direction of the setting pixel dimension;N tables Show target image pixel dimension quantity occupied on the setting pixel dimension of described image;W represents described image pair Actual size of the shooting area answered in the vertical direction of the setting pixel dimension;NwDescribed image is in the setting pixel Pixel quantity in the vertical direction of dimension.
For example, when calculating the width in the crack shown in Fig. 2 according to above-mentioned formula, W represents the shooting area corresponding to Fig. 2 Transverse width;Assuming that a height of N of the wide * of image resolution ratiow×Nh, then NwRepresent the pixel number of columns of image shown in Fig. 2;N represents Fig. 2 In crack occupied by pixel number of columns, the developed width in the crack that can be finally calculated in Fig. 2 according to above-mentioned formula is w_c。
The method for the recognition target image that the embodiment of the present invention proposes, is calculated in image in addition to target image first Image-region average gray;It is then determined that the target image is occupied on the setting pixel dimension of described image The gray value of pixel in each pixel dimension;Secondly according to the pixel in the average gray and each pixel dimension Gray value, target image pixel dimension quantity occupied on the setting pixel dimension of described image is calculated; Finally according to target image pixel dimension quantity occupied on the setting pixel dimension of described image, and the figure Actual size of the shooting area in the vertical direction of the setting pixel dimension, is calculated the target image as corresponding to Actual size in the vertical direction of the setting pixel dimension.In above-mentioned calculating process, make full use of target image with And the gray value of image-region calculates the actual size of target image around target image, relative to merely according to target image ash Angle value calculates target image actual size, and the degree of accuracy is higher.
It is shown in Figure 3 the embodiment of the invention also discloses a kind of device of recognition target image size, including:
First computing unit 100, the gray scale for the image-region in addition to target image to be calculated in image are averaged Value;
Gray value determining unit 110, shared by determining the target image on the setting pixel dimension of described image According to each pixel dimension in pixel gray value;
Second computing unit 120, for according to the average gray and the target image described image setting The gray value of pixel on pixel dimension in occupied each pixel dimension, is calculated the target image in described image Setting pixel dimension on occupied pixel dimension quantity;
3rd computing unit 130, occupied by according to the target image on the setting pixel dimension of described image Pixel dimension quantity, and shooting area corresponding to described image it is described setting pixel dimension vertical direction on reality Size, actual size of the target image in the vertical direction of the setting pixel dimension is calculated.
Specifically, the specific works content of the unit in the present embodiment, the content of above method embodiment is referred to, Here is omitted.
Optionally, in another embodiment of the present invention, the second computing unit 120 is according to the average gray and institute The gray value of the pixel in each pixel dimension is stated, the target image is calculated on the setting pixel dimension of described image During occupied pixel dimension quantity, it is specifically used for:
Target image picture occupied on the setting pixel dimension of described image is calculated according to below equation Plain number of dimensions:
Wherein, n represents target image pixel dimension quantity occupied on the setting pixel dimension of described image; I represents target image pixel dimension occupied on the setting pixel dimension of described image;aiRepresent the target figure As the gray value of the pixel in occupied each pixel dimension on the setting pixel dimension of described image;Represent the figure The average gray of image-region as in addition to the target image.
Specifically, the specific works content of the second computing unit 120 in the present embodiment, refers to above method embodiment Content, here is omitted.
Optionally, in another embodiment of the present invention, the 3rd computing unit 130 according to the target image described Occupied pixel dimension quantity on the setting pixel dimension of image, and shooting area corresponding to described image is in the setting Actual size in the vertical direction of pixel dimension, Vertical Square of the target image in the setting pixel dimension is calculated During upward actual size, it is specifically used for:
Reality of the target image in the vertical direction of the setting pixel dimension is calculated according to equation below Size:
Wherein, w_c represents actual size of the target image in the vertical direction of the setting pixel dimension;N tables Show target image pixel dimension quantity occupied on the setting pixel dimension of described image;W represents described image pair Actual size of the shooting area answered in the vertical direction of the setting pixel dimension;NwDescribed image is in the setting pixel Pixel quantity in the vertical direction of dimension.
Specifically, the specific works content of the 3rd computing unit 130 in the present embodiment, refers to above method embodiment Content, here is omitted.
Optionally, in another embodiment of the present invention, gray value determining unit 110 determines the target image in institute When stating the gray value of the pixel in each pixel dimension occupied on the setting pixel dimension of image, it is specifically used for:
Determine respectively in the target image each pixel dimension occupied on the setting pixel dimension of described image Pixel average gray value.
Specifically, the specific works content of the gray value determining unit 110 in the present embodiment, refers to above method implementation The content of example, here is omitted.
The foregoing description of the disclosed embodiments, professional and technical personnel in the field are enable to realize or using the present invention. A variety of modifications to these embodiments will be apparent for those skilled in the art, as defined herein General Principle can be realized in other embodiments without departing from the spirit or scope of the present invention.Therefore, it is of the invention The embodiments shown herein is not intended to be limited to, and is to fit to and principles disclosed herein and features of novelty phase one The most wide scope caused.

Claims (8)

  1. A kind of 1. method of recognition target image size, it is characterised in that including:
    The average gray of image-region in addition to target image is calculated in image;
    Determine the pixel in the target image each pixel dimension occupied on the setting pixel dimension of described image Gray value;
    According to the average gray and the target image each picture occupied on the setting pixel dimension of described image The gray value of pixel in plain dimension, it is occupied on the setting pixel dimension of described image that the target image is calculated Pixel dimension quantity;
    According to target image pixel dimension quantity occupied on the setting pixel dimension of described image, and the figure Actual size of the shooting area in the vertical direction of the setting pixel dimension, is calculated the target image as corresponding to Actual size in the vertical direction of the setting pixel dimension.
  2. 2. according to the method for claim 1, it is characterised in that described according to the average gray and each pixel The gray value of pixel in dimension, target image picture occupied on the setting pixel dimension of described image is calculated Plain number of dimensions, including:
    Target image pixel occupied on the setting pixel dimension of described image is calculated according to below equation to tie up Number of degrees amount:
    <mrow> <mi>n</mi> <mo>=</mo> <mfrac> <mrow> <munderover> <mo>&amp;Sigma;</mo> <mn>1</mn> <mi>i</mi> </munderover> <mrow> <mo>(</mo> <msub> <mi>a</mi> <mi>i</mi> </msub> <mo>-</mo> <mover> <mi>S</mi> <mo>&amp;OverBar;</mo> </mover> <mo>)</mo> </mrow> </mrow> <mover> <mi>S</mi> <mo>&amp;OverBar;</mo> </mover> </mfrac> </mrow>
    Wherein, n represents target image pixel dimension quantity occupied on the setting pixel dimension of described image;I tables Show target image pixel dimension occupied on the setting pixel dimension of described image;aiRepresent that the target image exists The gray value of pixel on the setting pixel dimension of described image in occupied each pixel dimension;Represent in described image The average gray of image-region in addition to the target image.
  3. 3. according to the method for claim 2, it is characterised in that it is described according to the target image described image setting Occupied pixel dimension quantity on pixel dimension, and shooting area corresponding to described image is in the setting pixel dimension Actual size in vertical direction, reality of the target image in the vertical direction of the setting pixel dimension is calculated Size, including:
    Actual size of the target image in the vertical direction of the setting pixel dimension is calculated according to equation below:
    <mrow> <mi>w</mi> <mo>_</mo> <mi>c</mi> <mo>=</mo> <mi>n</mi> <mo>&amp;times;</mo> <mfrac> <mi>W</mi> <msub> <mi>N</mi> <mi>w</mi> </msub> </mfrac> </mrow>
    Wherein, w_c represents actual size of the target image in the vertical direction of the setting pixel dimension;N represents institute State target image pixel dimension quantity occupied on the setting pixel dimension of described image;W is represented corresponding to described image Actual size of the shooting area in the vertical direction of the setting pixel dimension;NwDescribed image is in the setting pixel dimension Vertical direction on pixel quantity.
  4. 4. according to the method for claim 1, it is characterised in that the setting for determining the target image in described image The gray value of pixel on pixel dimension in occupied each pixel dimension, including:
    The picture in the target image each pixel dimension occupied on the setting pixel dimension of described image is determined respectively The average gray value of element.
  5. A kind of 5. device of recognition target image size, it is characterised in that including:
    First computing unit, for the average gray of the image-region in addition to target image to be calculated in image;
    Gray value determining unit, for determine the target image on the setting pixel dimension of described image it is occupied each The gray value of pixel in pixel dimension;
    Second computing unit, for according to the average gray and the target image described image setting pixel dimension The gray value of pixel in upper occupied each pixel dimension, is calculated setting picture of the target image in described image Occupied pixel dimension quantity in plain dimension;
    3rd computing unit, for being tieed up according to target image pixel occupied on the setting pixel dimension of described image Number of degrees amount, and actual size of the shooting area corresponding to described image in the vertical direction of the setting pixel dimension, meter Calculate the actual size for obtaining the target image in the vertical direction of the setting pixel dimension.
  6. 6. device according to claim 5, it is characterised in that second computing unit according to the average gray and The gray value of pixel in each pixel dimension, setting pixel dimension of the target image in described image is calculated Above during occupied pixel dimension quantity, it is specifically used for:
    Target image pixel occupied on the setting pixel dimension of described image is calculated according to below equation to tie up Number of degrees amount:
    <mrow> <mi>n</mi> <mo>=</mo> <mfrac> <mrow> <munderover> <mo>&amp;Sigma;</mo> <mn>1</mn> <mi>i</mi> </munderover> <mrow> <mo>(</mo> <msub> <mi>a</mi> <mi>i</mi> </msub> <mo>-</mo> <mover> <mi>S</mi> <mo>&amp;OverBar;</mo> </mover> <mo>)</mo> </mrow> </mrow> <mover> <mi>S</mi> <mo>&amp;OverBar;</mo> </mover> </mfrac> </mrow>
    Wherein, n represents target image pixel dimension quantity occupied on the setting pixel dimension of described image;I tables Show target image pixel dimension occupied on the setting pixel dimension of described image;aiRepresent that the target image exists The gray value of pixel on the setting pixel dimension of described image in occupied each pixel dimension;Represent in described image The average gray of image-region in addition to the target image.
  7. 7. device according to claim 6, it is characterised in that the 3rd computing unit is according to the target image in institute Pixel dimension quantity occupied on the setting pixel dimension of image is stated, and shooting area corresponding to described image is set described Determine the actual size in the vertical direction of pixel dimension, the target image is calculated in the vertical of the setting pixel dimension During actual size on direction, it is specifically used for:
    Actual size of the target image in the vertical direction of the setting pixel dimension is calculated according to equation below:
    <mrow> <mi>w</mi> <mo>_</mo> <mi>c</mi> <mo>=</mo> <mi>n</mi> <mo>&amp;times;</mo> <mfrac> <mi>W</mi> <msub> <mi>N</mi> <mi>w</mi> </msub> </mfrac> </mrow>
    Wherein, w_c represents actual size of the target image in the vertical direction of the setting pixel dimension;N represents institute State target image pixel dimension quantity occupied on the setting pixel dimension of described image;W is represented corresponding to described image Actual size of the shooting area in the vertical direction of the setting pixel dimension;NwDescribed image is in the setting pixel dimension Vertical direction on pixel quantity.
  8. 8. device according to claim 6, it is characterised in that the gray value determining unit determines that the target image exists During the gray value of the pixel on the setting pixel dimension of described image in occupied each pixel dimension, it is specifically used for:
    The picture in the target image each pixel dimension occupied on the setting pixel dimension of described image is determined respectively The average gray value of element.
CN201711083473.2A 2017-11-07 2017-11-07 A kind of method and device of recognition target image size Pending CN107886534A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711083473.2A CN107886534A (en) 2017-11-07 2017-11-07 A kind of method and device of recognition target image size

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711083473.2A CN107886534A (en) 2017-11-07 2017-11-07 A kind of method and device of recognition target image size

Publications (1)

Publication Number Publication Date
CN107886534A true CN107886534A (en) 2018-04-06

Family

ID=61778936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711083473.2A Pending CN107886534A (en) 2017-11-07 2017-11-07 A kind of method and device of recognition target image size

Country Status (1)

Country Link
CN (1) CN107886534A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901499A (en) * 2020-07-17 2020-11-06 青岛聚好联科技有限公司 Method and equipment for calculating actual pixel distance in video image

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040126002A1 (en) * 2002-12-25 2004-07-01 Chih-Kuang Chang System and method for measuring an object
CN101256156A (en) * 2008-04-09 2008-09-03 西安电子科技大学 Precision measurement method for flat crack and antenna crack
CN102914261A (en) * 2012-09-29 2013-02-06 凯迈(洛阳)测控有限公司 Non-contact thermal target size measurement system and method
CN103942786A (en) * 2014-04-09 2014-07-23 北京航空航天大学 Self-adaptation block mass target detecting method of unmanned aerial vehicle visible light and infrared images
CN106441235A (en) * 2016-09-23 2017-02-22 湖南科技大学 Concrete-crack-width identification system and method based on robot bomb airborne imaging
CN107240079A (en) * 2017-06-09 2017-10-10 南京理工大学 A kind of road surface crack detection method based on image procossing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040126002A1 (en) * 2002-12-25 2004-07-01 Chih-Kuang Chang System and method for measuring an object
CN101256156A (en) * 2008-04-09 2008-09-03 西安电子科技大学 Precision measurement method for flat crack and antenna crack
CN102914261A (en) * 2012-09-29 2013-02-06 凯迈(洛阳)测控有限公司 Non-contact thermal target size measurement system and method
CN103942786A (en) * 2014-04-09 2014-07-23 北京航空航天大学 Self-adaptation block mass target detecting method of unmanned aerial vehicle visible light and infrared images
CN106441235A (en) * 2016-09-23 2017-02-22 湖南科技大学 Concrete-crack-width identification system and method based on robot bomb airborne imaging
CN107240079A (en) * 2017-06-09 2017-10-10 南京理工大学 A kind of road surface crack detection method based on image procossing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901499A (en) * 2020-07-17 2020-11-06 青岛聚好联科技有限公司 Method and equipment for calculating actual pixel distance in video image
CN111901499B (en) * 2020-07-17 2022-04-01 青岛聚好联科技有限公司 Method and equipment for calculating actual pixel distance in video image

Similar Documents

Publication Publication Date Title
Yang et al. Thin crack observation in a reinforced concrete bridge pier test using image processing and analysis
CN101408985B (en) Method and apparatus for extracting circular luminous spot second-pixel center
CN103033132B (en) Plane survey method and device based on monocular vision
CN102208108B (en) Large-field high-precision quick field overall calibration method for camera
CN101271575B (en) Orthogonal projection emendation method for image measurement in industry close range photography
CN103530880A (en) Camera calibration method based on projected Gaussian grid pattern
US20150022659A1 (en) Luminance measuring apparatus
CN105910540B (en) A kind of method for Site Detection building wall body slit
CN104596439A (en) Speckle matching and three-dimensional measuring method based on phase information aiding
CN102564348A (en) Systematic geometric demarcation method for reflection three-dimensional measurement of stripe
CN107749284B (en) Compensation data acquisition method of curved panel and liquid crystal display
CN104182969B (en) Internal and external parameter calibration method of single-scanline camera
CN114018932B (en) Pavement disease index measurement method based on rectangular calibration object
JP2015036632A5 (en)
CN105118042A (en) Aligned adhering method and device
EP3748283A1 (en) Repair length determination method and repair length determination device
CN103927748A (en) Coordinate calibrating method based on multi-rectangle image distance transformation model
CN112215308B (en) Single-order detection method and device for hoisted object, electronic equipment and storage medium
CN106643567A (en) Lane deviation system production line calibration board verification method and system
CN108055486B (en) Brightness correction method and device
CN104807405A (en) Three-dimensional coordinate measurement method based on light ray angle calibration
CN113465573A (en) Monocular distance measuring method and device and intelligent device
CN111047633B (en) Monocular distance measuring device
CN102682424A (en) Image amplification processing method based on edge direction difference
CN109451298B (en) Deviation angle detection method, device and equipment for double cameras

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20180406

WD01 Invention patent application deemed withdrawn after publication