CN105323419A - Method for generating orientation images - Google Patents

Method for generating orientation images Download PDF

Info

Publication number
CN105323419A
CN105323419A CN201410357215.9A CN201410357215A CN105323419A CN 105323419 A CN105323419 A CN 105323419A CN 201410357215 A CN201410357215 A CN 201410357215A CN 105323419 A CN105323419 A CN 105323419A
Authority
CN
China
Prior art keywords
component
ratio
current
look
absolute value
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
CN201410357215.9A
Other languages
Chinese (zh)
Other versions
CN105323419B (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.)
Altek Corp
Original Assignee
ALTEC Corp
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 ALTEC Corp filed Critical ALTEC Corp
Priority to CN201410357215.9A priority Critical patent/CN105323419B/en
Publication of CN105323419A publication Critical patent/CN105323419A/en
Application granted granted Critical
Publication of CN105323419B publication Critical patent/CN105323419B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The invention provides a method for generating orientation images. The method is suitable for an electronic device. The method includes the following steps that: a plurality of input pixels of an input image are received, wherein the input pixels include current input pixels; edge detection of a first direction and a second direction is performed on the current input pixels, so that a first current gradient relative to the first direction and a second current gradient relative to the second direction are generated; the ratio of the first current gradient to the sum of the absolute values of current gradients is calculated, so that a current ratio can be obtained, wherein the sum of the absolute values of the current gradients is the sum of the absolute value of the first current gradient and the absolute value of the second current gradient; the positive symbol and negative symbol of the second current gradient are obtained, so that a current positive symbol and negative symbol can be obtained; and the current ratio and the current positive symbol and negative symbol are inputted in a lookup table, so that an image orientation angle corresponding to the current input pixels can be obtained.

Description

Produce the method for bearing images
Technical field
The invention relates to a kind of technology of image procossing, and relate to a kind of method producing bearing images especially.
Background technology
In the field of computer vision and image procossing, rim detection is that object detects and is important previous operations.So-called " edge " refers to image, and the pixel value of its contiguous picture element has the set of marked change, namely discontinuous the and rough region of neighborhood pixels value in image.General pattern is after the rim detection of carrying out horizontal direction and vertical direction, horizontal gradient Gx and the vertical gradient Gy of each picture element can be obtained, and calculate gradient intensity and the gradient direction of each picture element position accordingly, and then to utilize in follow-up handling procedure be such as histograms of oriented gradients (histogramoforientedgradient, be called for short: mode HoG) carries out image feature extraction, to detect the object in image.
But, under the horizontal gradient Gx and vertical gradient Gy prerequisite of each picture element known, often need higher execution efficiency or storage space.For example, if to set up arcsin function (arcsine) look-up table to inquire about gradient direction, then need pass through computing, the operand wherein opening radical sign is not suitable for the process chip of low cost.If to set up arctan function (arctangent) look-up table to inquire about gradient direction, due to scope be [-∞ ,+∞], therefore set up arctan function look-up table cannot contain all demands of tabling look-up.If with the sign symbol of horizontal gradient Gx and vertical gradient Gy and set up the arctan function look-up table of two dimension to inquire about gradient direction, then need very large memory to store this two-dimensional look-up table, be unfavorable for two-dimensional look-up table to be loaded into (on-chipmemory) speed-up computation in embedded memory, therefore cannot reach the demand of real-time operation.
Summary of the invention
In view of this, the invention provides a kind of method producing bearing images, it can the implementation of low cost, in real time and accurately produce the bearing images being associated with an input picture.
The present invention proposes a kind of method producing bearing images, is applicable to electronic installation, and wherein bearing images comprises multiple image orientation angle, and the scope of described image orientation angle is that between 0 to 2 π or 0 degree to 360 degree, the method comprises the following steps.First, receive multiple input pixels of input picture, wherein said input pixel comprises and inputs pixel at present.For inputting pixel at present, carry out the rim detection of first direction and the rim detection of second direction, to produce the first current gradient relative to first direction and the second current gradient relative to second direction respectively.Calculate the ratio of the first current gradient and current gradient absolute value summation, to obtain current ratio, wherein gradient absolute value summation is the summation of the absolute value of the first current gradient and the absolute value of the second current gradient at present.Obtain the sign symbol of the second current gradient, to obtain current sign symbol.Current ratio and current sign symbol are inputed to look-up table, to obtain the image orientation angle corresponding to input pixel at present.
In one embodiment of this invention, before the step of described input pixel receiving input picture, said method also comprises the following steps.Obtain relative to first direction multiple containing sign and 0 the first component and relative to second direction multiple containing sign and 0 second components.Combine for each of described first component and second component: calculate the first ratio corresponding to the first component, wherein the first ratio is that the first component opens radical sign divided by the quadratic sum of the first component and second component; Obtain the sign symbol of second component, to obtain with reference to sign symbol; According to the first ratio and with reference to sign symbol, utilize inverse cosine function or arcsin function, computer azimuth angle, wherein the codomain of orientation angles is between 0 to 2 π or between 0 degree to 360 degree; Calculate the second ratio corresponding to the first component, wherein the second ratio is that the first component is divided by the summation with the absolute value of the first component and the absolute value of second component; And according to the second ratio, with reference to sign symbol and the orientation angles that utilizes the first ratio to draw, set up look-up table, wherein the input index of look-up table is the second ratio and with reference to sign symbol, and the output of look-up table is orientation angles.
In one embodiment of this invention, above-mentioned first direction is perpendicular to second direction.
The present invention proposes a kind of method producing bearing images, is applicable to electronic installation, and wherein bearing images comprises multiple image orientation angle, and the scope of described image orientation angle is that between 0 to π or 0 degree to 180 degree, the method comprises the following steps.Receive multiple input pixels of input picture, wherein said input pixel comprises and inputs pixel at present.For inputting pixel at present, carry out the rim detection of first direction and the rim detection of second direction, to produce the first current gradient relative to first direction and the second current gradient relative to second direction respectively.Calculate the ratio of the first current gradient and current gradient absolute value summation, to obtain current ratio, wherein gradient absolute value summation is the summation of the absolute value of the first current gradient and the absolute value of the second current gradient at present.Current ratio is inputed to look-up table, to obtain the image orientation angle corresponding to input pixel at present.
In one embodiment of this invention, before the step of described input pixel receiving input picture, said method also comprises the following steps.Obtain relative to first direction multiple containing sign and 0 the first component and relative to second direction multiple containing sign and 0 second components.Combine for each of described first component and second component: calculate the first ratio corresponding to the first component, wherein the first ratio is that the first component opens radical sign divided by the quadratic sum of the first component and second component; According to the first ratio, utilize inverse cosine function or arcsin function, computer azimuth angle, wherein the codomain of orientation angles is between 0 to π or between 0 degree to 180 degree; Calculate and correspond to the second ratio of the first component, wherein the second ratio is the first component divided by the summation of the absolute value of the first component and the absolute value of second component; And according to the second ratio and the orientation angles that utilizes the first ratio to draw, set up look-up table, wherein the input index of look-up table is the second ratio, and the output of look-up table is orientation angles.
In one embodiment of this invention, above-mentioned first direction is perpendicular to second direction.
The present invention proposes a kind of method producing bearing images, is applicable to electronic installation, and wherein bearing images comprises multiple image orientation angle, and the scope of described image orientation angle is 0 between π/4 or 0 degree to 90 degree, and the method comprises the following steps.Receive multiple input pixels of input picture, wherein said input pixel comprises and inputs pixel at present.For inputting pixel at present, carry out the rim detection of first direction and the rim detection of second direction, to produce the first current gradient relative to first direction and the second current gradient relative to second direction respectively.Calculate the absolute value of the first current gradient and the ratio of current gradient absolute value total value, to obtain current ratio, wherein gradient absolute value summation is the summation of the absolute value of the first current gradient and the absolute value of the second current gradient at present.Current ratio is inputed to look-up table, to obtain the image orientation angle corresponding to input pixel at present.
In one embodiment of this invention, before the step of described input pixel receiving input picture, said method also comprises the following steps.Obtain relative to multiple positive number of first direction and first component of 0 and relative to multiple positive number of second direction and the second component of 0.Combine for each of described first component and second component: calculate the first ratio corresponding to the first component, wherein the first ratio is that the numerical value of the first component opens radical sign divided by the quadratic sum of the first component and second component; According to the first ratio, utilize inverse cosine function or arcsin function, computer azimuth angle, wherein the codomain of orientation angles is between 0 to π/4 or between 0 degree to 90 degree; Calculate and correspond to the second ratio of the first component, wherein the second ratio is the summation of numerical value divided by the numerical value of the first component and the numerical value of second component of the first component; And according to the second ratio and the orientation angles that utilizes the first ratio to draw, set up look-up table, wherein the input index of look-up table is the second ratio, and the output of look-up table is orientation angles.
In one embodiment of this invention, above-mentioned first direction is perpendicular to second direction.
Based on above-mentioned, the method of generation bearing images proposed by the invention, it prestores in an electronic one and is mathematically equivalent to arcsin function table or inverse cosine function table and need not uses the look-up table of a large amount of storage space, receiving input picture and after utilizing rim detection to obtain each input first current gradient of pixel and the second current gradient, computing by absolute value replace processing speed slower open radical sign computing and square operation, and utilize look-up table to obtain bearing images.Combination both this, except obtaining accurate bearing images, also can be embodied in cost lower and have on the consumption electronic products of the process chip of real-time operation ability, to strengthen the present invention's applicability in actual applications.
For above-mentioned feature and advantage of the present invention can be become apparent, special embodiment below, and coordinate accompanying drawing to be described in detail below.
Accompanying drawing explanation
Fig. 1 is a kind of method flow diagram setting up the look-up table of bearing images shown by one embodiment of the invention;
Fig. 2 is a kind of method flow diagram producing bearing images shown by the embodiment of Fig. 1;
Fig. 3 is a kind of method flow diagram setting up the look-up table of bearing images shown by another embodiment of the present invention;
Fig. 4 is a kind of method flow diagram producing bearing images shown by the embodiment of Fig. 3.
Fig. 5 is a kind of method flow diagram setting up the look-up table of bearing images shown by another embodiment of the present invention;
Fig. 6 is a kind of method flow diagram producing bearing images shown by the embodiment of Fig. 5.
Description of reference numerals:
S110 ~ S160: the method flow setting up the look-up table of bearing images;
S210 ~ S270: the method flow producing bearing images;
S310 ~ S350: the method flow setting up the look-up table of bearing images;
S410 ~ S460: the method flow producing bearing images;
S510 ~ S550: the method flow setting up the look-up table of bearing images;
S610 ~ S660: the method flow producing bearing images.
Embodiment
Under the horizontal gradient Gx and vertical gradient Gy prerequisite of each picture element known, if to set up arcsin function look-up table to obtain the gradient direction of each picture element, need pass through computing, the operand wherein opening radical sign is not suitable for the process chip of low cost.Concept of the present invention be with the lower signed magnitude arithmetic(al) of operand (| Gx|+|Gy|) replace operand higher open radical sign computing and square operation and according to setting up the look-up table being equivalent to arcsin function table or inverse cosine function table in advance, the bearing images of input picture can be obtained in real time and accurately.
Next section Example of the present invention will coordinate accompanying drawing to describe in detail, the component symbol that following description is quoted, when different accompanying drawing occurs that identical component symbol will be considered as same or analogous element.These embodiments are a part of the present invention, and unexposed all embodiments of the present invention.More precisely, these embodiments are the example of the apparatus and method in patent claim of the present invention.
Fig. 1 is a kind of method flow diagram setting up the look-up table of bearing images shown by one embodiment of the invention.Mathematically be equivalent to arcsin function table or inverse cosine function table at this look-up table, its codomain being applicable to orientation angles is the bearing images between 0 to 2 π or 0 degree to 360 degree.
Please also refer to Fig. 1, in step s 110, first obtain and comprise sign and first component of 0 and the multiple second components comprising sign and 0 relative to second direction relative to first direction multiple.In the present embodiment, first direction is perpendicular to second direction, then the first component is horizontal component Gx, and second component is vertical component Gy, and the quantity wherein in order to the first component and second component of setting up look-up table will determine the accuracy of look-up table.
Then, in the step s 120, the following step is performed respectively by combining (Gx, Gy) for each of above-mentioned first component and second component.First, calculate the first ratio corresponding to the first component, wherein the first ratio is that the first component opens radical sign divided by the quadratic sum of the first component and second component, and it can represent by equation (1.1):
R 1 = Gx G x 2 + G y 2 Equation (1.1)
Wherein R 1be the first ratio.In addition, the codomain being applicable to orientation angles due to the look-up table in the present embodiment is the bearing images between 0 to 2 π or 0 degree to 360 degree, therefore the sign symbol of second component will be obtained at this, to obtain with reference to sign symbol (step S130), it can represent by equation (1.2):
S=sign (Gy) equation (1.2)
Wherein S is with reference to sign symbol.
Then, in step S140, first ratio that can obtain according to step S120 and step S130 and reference sign symbol, utilize inverse cosine function or arcsin function, computer azimuth angle.In other words, arccos (R will first be calculated in this step 1) or arcsin is (R 1) after, then obtain orientation angles θ according to reference to sign symbol S.Because the first component at this is defined as horizontal component Gx, therefore in the present embodiment will with arcsin function arcsin (R 1) coordinate reference sign symbol S to obtain orientation angles θ.
In addition, in step S150, will calculate and correspond to the second ratio of the first component, wherein the second ratio be the first component divided by the summation with the absolute value of the first component and the absolute value of second component, it can equation (1.3) expression:
R 2 = Gx ( | Gx | + | Gy | ) Equation (1.3)
Wherein R 2be the second ratio.
Afterwards, in step S160, according to the second ratio, reference sign symbol and the orientation angles utilizing step S140 to draw, look-up table can be set up, wherein the input index of look-up table is the second ratio and reference sign symbol, and wherein the output of look-up table is orientation angles.Owing to forming the first ratio R 1function with formation second ratio R 2function be all injective function (injectivefunction), the look-up table therefore set up in step S160, it is mathematically also equivalent to the arcsin function look-up table set up according to the first ratio, reference sign symbol and orientation angles.
Fig. 2 is a kind of method flow diagram producing bearing images shown by the embodiment of Fig. 1.Bearing images in the present embodiment comprises multiple image orientation angle, and the codomain of described image orientation angle is between 0 to 2 π or 0 degree to 360 degree.The method flow of the present embodiment is applicable to the electronic installation that PC, notebook computer, digital camera, digital camera, network camera, smart mobile phone, panel computer, driving recorder, vehicle video-audio system etc. have image processing function, and the present invention is not as limit.At the look-up table that this electronic installation will be set up in the embodiment of the Fig. 1 that prestores.
Please refer to Fig. 2, in step S210, first receive multiple input pixels of input picture, wherein said input pixel comprises and inputs pixel at present.A matrix is arranged in row (column) and the mode of row (row) in this input pixel, and due in the present embodiment for each input pixel processing mode all identical, be therefore only described with the current input pixel inputted in pixel.
Then, respectively in step S220 and step S230, for inputting pixel at present, carry out the rim detection of first direction and the rim detection of second direction, to produce the first current gradient relative to first direction and the second current gradient relative to second direction.In detail, first can utilize edge detection filter (edgedetectionfilter) at this, calculate and input the gradient of pixel relative to different directions at present.In the present embodiment, first direction perpendicular to second direction, and relative to first direction the first current gradient and be horizontal gradient Gx ' and the vertical gradient Gy ' of at present input pixel relative to the current gradient of second direction.
Afterwards, in step S240, calculate the ratio of the first current gradient and current gradient absolute value summation, to obtain current ratio, wherein gradient absolute value summation is the summation of the absolute value of the first current gradient and the absolute value of the second current gradient at present, and it can represent by equation (2.1):
R ′ = G x ′ ( | G x ′ | + | G y ′ | ) Equation (2.1)
And again in step s 250, obtain the sign symbol of the second current gradient, to obtain current sign symbol, it can represent by equation (2.2):
S '=sign (Gy ') equation (2.2)
Wherein S ' is current sign symbol.Then, in step S260, the current ratio obtained by step S240 and step S250 and at present sign symbol input to the look-up table set up according to Fig. 1, to obtain the current orientation angles corresponding to input pixel at present, and export in step S270.When all input processes pixel of input picture are complete, be the bearing images between 0 to 2 π or 0 degree to 360 degree by generation codomain.
Fig. 3 is a kind of method flow diagram setting up the look-up table of bearing images shown by another embodiment of the present invention.Fig. 4 is a kind of method flow diagram producing bearing images shown by the embodiment of Fig. 3.At this Fig. 3 the look-up table of foundation is mathematically also equivalent to arcsin function table or inverse cosine function table, its codomain being applicable to orientation angles is 0 to the bearing images between π or 0 degree to 180 degree.The flow process of Fig. 3 and Fig. 4 is similar to the flow process of Fig. 1 and Fig. 2, is only illustrated for difference at this.
Please also refer to Fig. 3, in step S310, first obtain and comprise sign and first component of 0 and the multiple second components comprising sign and 0 relative to second direction relative to first direction multiple.In the present embodiment, first direction is perpendicular to second direction, then the first component is horizontal component Gx, and second component is vertical component Gy.
Then, in step s 320, the following step is performed respectively by combining (Gx, Gy) for each of above-mentioned first component and second component.First, calculate the first ratio corresponding to the first component, wherein the first ratio is that the first component opens radical sign divided by the quadratic sum of the first component and second component, and it can represent by equation (3.1):
R 1 = Gx G x 2 + G y 2 Equation (3.1)
Wherein R 1be the first ratio.In addition, the codomain being applicable to orientation angles due to the look-up table in the present embodiment is the bearing images between 0 to π or 0 degree to 180 degree, second component (namely, vertical component) sign can not affect the foundation of look-up table, therefore need not perform and be similar to S130 and have obtaining step about second component sign symbol.
In addition, in step S330, will calculate and correspond to the second ratio of the first component, wherein the second ratio be the first component divided by the summation with the absolute value of the first component and the absolute value of second component, it can equation (3.2) expression:
R 2 = Gx ( | Gx | + | Gy | ) Equation (3.2)
Wherein R 2be the second ratio.
Then, in step S340, first ratio that can obtain according to step S320, utilizes inverse cosine function or arcsin function, computer azimuth angle.Because the first ratio inherently has positive and negative, therefore calculated in this step orientation angles θ between 0 to π or 0 degree to 180 degree between.
Then, in step S350, according to the second ratio and the orientation angles utilizing step S340 to draw, can set up look-up table, wherein the input index of look-up table is the second ratio, and the output of look-up table is orientation angles.The look-up table set up in this step S350, it is mathematically also equivalent to the arcsin function look-up table set up according to the first ratio and orientation angles.
Then, please refer to Fig. 4, bearing images in the present embodiment comprises multiple image orientation angle, and the codomain of described image orientation angle is between 0 to π or 0 degree to 180 degree.The method of the present embodiment is applicable to be similar to the electronic installation in Fig. 2 embodiment, and at the look-up table that this electronic installation will be set up in the embodiment of the Fig. 3 that prestores.
In step S410, first receive multiple input pixels of input picture, wherein said input pixel comprises and inputs pixel at present.Similarly, the processing mode for each input pixel in the present embodiment is all identical, is therefore only described with the current input pixel inputted in pixel.
Then, respectively in step S420 and step S430, for inputting pixel at present, carry out the rim detection of first direction and the rim detection of second direction, to produce the first current gradient relative to first direction and the second current gradient relative to second direction.In the present embodiment, first direction perpendicular to second direction, and relative to first direction the first current gradient and be horizontal gradient Gx ' and the vertical gradient Gy ' of at present input pixel relative to the current gradient of second direction.
Afterwards, in step S440, calculate the ratio of the first current gradient and current gradient absolute value summation, to obtain current ratio, wherein gradient absolute value summation is the summation of the absolute value of the first current gradient and the absolute value of the second current gradient at present, and it can represent by equation (4.1):
R ′ = G x ′ ( | G x ′ | + | G y ′ | ) Equation (4.1)
Then, in step S450, the current ratio obtained by step S440 inputs to the look-up table set up according to Fig. 3, to obtain the current orientation angles corresponding to input pixel at present, and exports in step S460.When all input processes pixel of input picture are complete, be the bearing images between 0 to π or 0 degree to 180 degree by generation codomain.
Fig. 5 is a kind of method flow diagram setting up the look-up table of bearing images shown by another embodiment of the present invention.Fig. 6 is a kind of method flow diagram producing bearing images shown by the embodiment of Fig. 5.At this Fig. 5 the look-up table of foundation is mathematically also equivalent to arcsin function table or inverse cosine function table, its codomain being applicable to orientation angles is the bearing images between 0 to π/4 or 0 degree to 90 degree.The flow process of Fig. 5 and Fig. 6 is similar to the flow process of Fig. 1 and Fig. 2, is only illustrated for difference at this.
Please also refer to Fig. 5, in step S510, first obtain relative to multiple positive number of first direction and first component of 0 and the multiple second components comprising multiple positive number and 0 relative to second direction.In the present embodiment, first direction is perpendicular to second direction, then the first component is horizontal component Gx, and second component is vertical component Gy.
Then, in step S520, the following step is performed respectively by combining (Gx, Gy) for each of above-mentioned first component and second component.First, calculate the first ratio corresponding to the first component, wherein the first ratio is that the first component opens radical sign divided by the quadratic sum of the first component and second component, and it can represent by equation (5.1):
R 1 = | Gx | G x 2 + G y 2 Equation (5.1)
Wherein R 1be the first ratio.In addition, the codomain being applicable to orientation angles due to the look-up table in the present embodiment is 0 bearing images arriving between π/4 or 0 degree to 90 degree, and no matter be the first component or second component be all be set as positive number or 0, therefore need not perform in the present embodiment and be similar to S130 and have obtaining step about second component sign symbol.
In addition, in step S530, will calculate and correspond to the second ratio of the first component, wherein the second ratio be the first component divided by the summation with the absolute value of the first component and the absolute value of second component, it can equation (5.2) expression:
R 2 = | Gx | ( | Gx | + | Gy | ) Equation (5.2)
Wherein R 2be the second ratio.
Then, in step S540, first ratio that can obtain according to step S520, utilizes inverse cosine function or arcsin function, computer azimuth angle.Because the present embodiment first ratio be inherently on the occasion of or 0, do not have negative, therefore calculated in this step orientation angles θ is between 0 to π/4 or 0 degree to 90 degree.
Then, in step S550, according to the second ratio and the orientation angles utilizing step S540 to draw, can set up look-up table, wherein the input index of look-up table is the second ratio, and the output of look-up table is orientation angles.The look-up table set up in this step S550, it is mathematically also equivalent to the arcsin function look-up table set up according to the first ratio and orientation angles.
Then, please refer to Fig. 6, bearing images in the present embodiment comprises multiple image orientation angle, and the codomain of described image orientation angle is 0 between pi/2 or 0 degree to 90 degree.The method of the present embodiment is applicable to be similar to the electronic installation in Fig. 2 embodiment, and at the look-up table that this electronic installation will be set up in the embodiment of the Fig. 5 that prestores.
In step S610, first receive multiple input pixels of input picture, wherein said input pixel comprises and inputs pixel at present.Similarly, because the processing mode for each input pixel in the present embodiment is all identical, be therefore only described with the current input pixel inputted in pixel.
Then, respectively in step S620 and step S630, for inputting pixel at present, carry out the rim detection of first direction and the rim detection of second direction, to produce the first current gradient relative to first direction and the second current gradient relative to second direction.In the present embodiment, first direction perpendicular to second direction, and relative to first direction the first current gradient and be horizontal gradient Gx ' and the vertical gradient Gy ' of at present input pixel relative to the current gradient of second direction.
Afterwards, in step S640, calculate the absolute value of the first current gradient and the ratio of current gradient absolute value total value, to obtain current ratio, wherein gradient absolute value summation is the summation of the absolute value of the first current gradient and the absolute value of the second current gradient at present, and it can represent by equation (6.1):
R ′ = | G x ′ | ( | G x ′ | + | G y ′ | ) Equation (6.1)
Due in the present embodiment be 0 between pi/2 or 0 degree to 90 degree for the codomain of orientation angles of the bearing images produced, therefore the first current gradient must be restricted on the occasion of.
Then, in step S650, the current ratio obtained by step S640 inputs to the look-up table set up according to Fig. 5, to obtain the current orientation angles corresponding to input pixel at present, and exports in step S660.When all input processes pixel of input picture are complete, be 0 bearing images arriving between π/4 or 0 degree to 90 degree by producing codomain.
In sum, the method of generation bearing images proposed by the invention, it prestores in an electronic one and is mathematically equivalent to arcsin function table or inverse cosine function table and need not uses the look-up table of a large amount of storage space, receiving input picture and after utilizing rim detection to obtain each input first current gradient of pixel and the second current gradient, computing by absolute value replace processing speed slower open radical sign computing and square operation, and utilize look-up table to obtain bearing images.Combination both this, except obtaining accurate bearing images, also can be embodied in cost lower and have on the consumption electronic products of the process chip of real-time operation ability, to strengthen the present invention's applicability in actual applications.
Last it is noted that above each embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to foregoing embodiments to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein some or all of technical characteristic; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.

Claims (9)

1. produce a method for bearing images, be applicable to electronic installation, it is characterized in that, this bearing images comprises multiple image orientation angle, and the scope of described image orientation angle is that between 0 to 2 π or 0 degree to 360 degree, the method comprises:
Receive multiple input pixels of input picture, wherein said input pixel comprises and inputs pixel at present;
Input pixel at present for this, carry out the rim detection of first direction and the rim detection of second direction, to produce the first current gradient relative to this first direction and the second current gradient relative to this second direction respectively;
Calculate the ratio of this first current gradient and current gradient absolute value summation, to obtain current ratio, wherein this current gradient absolute value summation is the summation of the absolute value of this first current gradient and the absolute value of this second current gradient;
Obtain the sign symbol of this second current gradient, to obtain current sign symbol; And
Input this current ratio and this current sign symbol to look-up table, to obtain this image orientation angle corresponding to this input pixel at present.
2. the method for generation bearing images according to claim 1, is characterized in that, the method for building up of this look-up table comprises:
Given relative to this first direction multiple containing sign and 0 the first component and relative to this second direction multiple containing sign and 0 second components; And
Combine for each of described first component and second component:
Calculate the first ratio corresponding to this first component, wherein this first ratio is that this first component opens radical sign divided by the quadratic sum of this first component and this second component;
Obtain the sign symbol of this second component, to obtain with reference to sign symbol;
According to this first ratio and this reference sign symbol, utilize inverse cosine function or arcsin function, computer azimuth angle, wherein the codomain of this orientation angles is between 0 to 2 π or between 0 degree to 360 degree;
Calculate the second ratio corresponding to this first component, wherein this second ratio is that this first component is divided by the summation with the absolute value of this first component and the absolute value of second component; And
According to this second ratio, this reference sign symbol and this orientation angles, set up this look-up table, wherein the input index of this look-up table is this second ratio and this reference sign symbol, and the output of this look-up table is this orientation angles.
3. the method for generation bearing images according to claim 2, is characterized in that, this first direction is perpendicular to this second direction.
4. produce a method for bearing images, be applicable to electronic installation, it is characterized in that, this bearing images comprises multiple image orientation angle, and the scope of described image orientation angle is between 0 to π or between 0 degree to 180 degree, the method comprises:
Receive multiple input pixels of input picture, wherein said input pixel comprises and inputs pixel at present;
Input pixel at present for this, carry out the rim detection of first direction and the rim detection of second direction, to produce the first current gradient relative to this first direction and the second current gradient relative to this second direction respectively;
Calculate the ratio of this first current gradient and current gradient absolute value summation, to obtain current ratio, wherein this current gradient absolute value summation is the summation of the absolute value of this first current gradient and the absolute value of this second current gradient; And
Input this current ratio to look-up table, to obtain this image orientation angle corresponding to this current input pixel.
5. the method for generation bearing images according to claim 4, is characterized in that, the method for building up of this look-up table comprises:
Given relative to this first direction multiple containing sign and 0 the first component and relative to this second direction multiple containing sign and 0 second components; And
Combine for each of described first component and second component:
Calculate the first ratio corresponding to this first component, wherein this first ratio is that this first component opens radical sign divided by the quadratic sum of this first component and this second component;
According to this first ratio, utilize inverse cosine function or arcsin function, computer azimuth angle, wherein the codomain of this orientation angles is between 0 to π or between 0 degree to 180 degree;
Calculate and correspond to the second ratio of this first component, wherein this second ratio is this first component divided by the summation of the absolute value of this first component and the absolute value of this second component; And
According to this second ratio and this orientation angles, set up this look-up table, wherein the input index of this look-up table is this second ratio, and the output of this look-up table is this orientation angles.
6. the method for generation bearing images according to claim 5, is characterized in that, this first direction is perpendicular to this second direction.
7. produce a method for bearing images, be applicable to electronic installation, it is characterized in that, this bearing images comprises multiple image orientation angle, and the scope of described image orientation angle is 0 between π/4 or 0 degree to 90 degree, and the method comprises:
Receive multiple input pixels of input picture, wherein said input pixel comprises and inputs pixel at present;
Input pixel at present for this, carry out the rim detection of first direction and the rim detection of second direction, to produce the first current gradient relative to this first direction and the second current gradient relative to this second direction respectively;
Calculate the absolute value of this first current gradient and the ratio of current gradient absolute value total value, to obtain current ratio, wherein this current gradient absolute value summation is the summation of the absolute value of this first current gradient and the absolute value of this second current gradient; And
Input this current ratio to look-up table, to obtain this image orientation angle corresponding to this current input pixel.
8. the method for generation bearing images according to claim 7, is characterized in that, the method for building up of this look-up table comprises:
Given relative to multiple positive number of this first direction and first component of 0 and relative to multiple positive number of this second direction and the second component of 0; And
Combine for each of described first component and second component:
Calculate and correspond to the first ratio of this first component, wherein this first ratio is that the numerical value of this first component opens radical sign divided by the quadratic sum of this first component and this second component;
According to this first ratio, utilize inverse cosine function or arcsin function, computer azimuth angle, wherein the codomain of this orientation angles is between 0 to π/4 or between 0 degree to 90 degree;
Calculate and correspond to the second ratio of this first component, wherein this second ratio is the summation of numerical value divided by the numerical value of this first component and the numerical value of this second component of this first component; And
According to this second ratio and this orientation angles, set up this look-up table, wherein the input index of this look-up table is this second ratio, and the output of this look-up table is this orientation angles.
9. the method for generation bearing images according to claim 8, is characterized in that, this first direction is perpendicular to this second direction.
CN201410357215.9A 2014-07-25 2014-07-25 The method for generating bearing images Active CN105323419B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410357215.9A CN105323419B (en) 2014-07-25 2014-07-25 The method for generating bearing images

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410357215.9A CN105323419B (en) 2014-07-25 2014-07-25 The method for generating bearing images

Publications (2)

Publication Number Publication Date
CN105323419A true CN105323419A (en) 2016-02-10
CN105323419B CN105323419B (en) 2018-07-31

Family

ID=55249952

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410357215.9A Active CN105323419B (en) 2014-07-25 2014-07-25 The method for generating bearing images

Country Status (1)

Country Link
CN (1) CN105323419B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105890597A (en) * 2016-04-07 2016-08-24 浙江漫思网络科技有限公司 Auxiliary positioning method based on image analysis
CN110189349A (en) * 2019-06-03 2019-08-30 湖南国科微电子股份有限公司 Image processing method and device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101236646A (en) * 2007-01-30 2008-08-06 宝利微系统控股公司 Method and system for detecting distinct strong relevant direction with estimated image
CN101493927A (en) * 2009-02-27 2009-07-29 西北工业大学 Image reliability detecting method based on edge direction characteristic
CN102243706A (en) * 2011-08-18 2011-11-16 杭州海康威视软件有限公司 Target classification method and system based on target edge direction
CN103295227A (en) * 2013-05-03 2013-09-11 苏州市职业大学 Circle detection method based on gradient direction segmentation
US20130315489A1 (en) * 2012-05-22 2013-11-28 Ricoh Company, Ltd. Pattern processing device, pattern processing method, and pattern processing program
CN103500435A (en) * 2013-09-11 2014-01-08 西安交通大学 Margin-oriented self-adaptive image interpolation method and VLSI implementation device thereof
CN103871049A (en) * 2014-01-08 2014-06-18 香港应用科技研究院有限公司 Edge detection method under non-uniform background light

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101236646A (en) * 2007-01-30 2008-08-06 宝利微系统控股公司 Method and system for detecting distinct strong relevant direction with estimated image
CN101493927A (en) * 2009-02-27 2009-07-29 西北工业大学 Image reliability detecting method based on edge direction characteristic
CN102243706A (en) * 2011-08-18 2011-11-16 杭州海康威视软件有限公司 Target classification method and system based on target edge direction
US20130315489A1 (en) * 2012-05-22 2013-11-28 Ricoh Company, Ltd. Pattern processing device, pattern processing method, and pattern processing program
CN103295227A (en) * 2013-05-03 2013-09-11 苏州市职业大学 Circle detection method based on gradient direction segmentation
CN103500435A (en) * 2013-09-11 2014-01-08 西安交通大学 Margin-oriented self-adaptive image interpolation method and VLSI implementation device thereof
CN103871049A (en) * 2014-01-08 2014-06-18 香港应用科技研究院有限公司 Edge detection method under non-uniform background light

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105890597A (en) * 2016-04-07 2016-08-24 浙江漫思网络科技有限公司 Auxiliary positioning method based on image analysis
CN105890597B (en) * 2016-04-07 2019-01-01 浙江漫思网络科技有限公司 A kind of assisted location method based on image analysis
CN110189349A (en) * 2019-06-03 2019-08-30 湖南国科微电子股份有限公司 Image processing method and device
CN110189349B (en) * 2019-06-03 2022-03-25 湖南国科微电子股份有限公司 Image processing method and device

Also Published As

Publication number Publication date
CN105323419B (en) 2018-07-31

Similar Documents

Publication Publication Date Title
CN112598762B (en) Three-dimensional lane line information generation method, device, electronic device, and medium
CN103108108A (en) Image stabilizing method and image stabilizing device
CN109816639B (en) Real-time straight line segment detection system and method based on LSD algorithm
US11756224B2 (en) Circle center detection in imagery
CN109447074A (en) A kind of licence plate recognition method and terminal device
US20210319576A1 (en) Method for expanding image depth and electronic device
CN113362420B (en) Road label generation method, device, equipment and storage medium
US9196051B2 (en) Electronic equipment with image analysis function and related method
EP4322109A1 (en) Green screen matting method and apparatus, and electronic device
CN107368829A (en) The method and apparatus for determining the rectangular target areas in input picture
CN110689014B (en) Method and device for detecting region of interest, electronic equipment and readable storage medium
CN105323419A (en) Method for generating orientation images
Wang et al. An FPGA co-processor for adaptive lane departure warning system
CN104616035B (en) Visual Map fast matching methods based on image overall feature and SURF algorithm
CN110663046B (en) Hardware accelerator for directional gradient histogram calculation
CN111862208A (en) Vehicle positioning method and device based on screen optical communication and server
CN103473566A (en) Multi-scale-model-based vehicle detection method
TWI511088B (en) Method for generating orientation image
CN116017129A (en) Method, device, system, equipment and medium for adjusting angle of light supplementing lamp
CN113033578B (en) Image calibration method, system, terminal and medium based on multi-scale feature matching
CN113361371A (en) Road extraction method, device, equipment and storage medium
CN106845479B (en) Small-size license plate detection method based on color contrast rectangle features
US20130329077A1 (en) Methods of image acquiring and electronic devices
CN117351450B (en) Monocular 3D detection method and device, electronic equipment and storage medium
Lee et al. Colour correction of stereo images using local correspondence

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20211105

Address after: Chinese Taiwan Hsinchu City Science Park force Road No. 12

Patentee after: Altek Corp.

Address before: Hsinchu, Taiwan, China force Road No. 3, 12 floor

Patentee before: ALTEK AUTOTRONICS Corp.