Update for 03-10-22 18:45
This commit is contained in:
parent
83da06c3df
commit
9699b95eaa
@ -1,4 +0,0 @@
|
|||||||
= Gradiant Vectors =
|
|
||||||
|
|
||||||
A gradiant vector is an array with one cell corresponding to each pixel in an
|
|
||||||
image, with each cell containing a [[vector]]
|
|
41
tech/gradient_vectors.wiki
Normal file
41
tech/gradient_vectors.wiki
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
= Gradient Vectors =
|
||||||
|
|
||||||
|
A gradiant vector is an array with one cell corresponding to each pixel in an
|
||||||
|
image, with each cell containing a [[vector]] of the image's gradiant at that
|
||||||
|
point.
|
||||||
|
|
||||||
|
A Vector in this case has both direction and maginiute.
|
||||||
|
|
||||||
|
A gradient in this case is the change in values along both the x and y around
|
||||||
|
some pixel.
|
||||||
|
|
||||||
|
An interesting and very important property of gradient vectors is their
|
||||||
|
relationship to edges in an image. An edge is any sudden change in an image,
|
||||||
|
including lines, boundaries between two objects, etc. A gradient vector will
|
||||||
|
always be a normal to the edge in an image.
|
||||||
|
|
||||||
|
== Example Algorithm ==
|
||||||
|
|
||||||
|
{{{
|
||||||
|
[X] [7] [X]
|
||||||
|
[2] [C] [8]
|
||||||
|
[X] [3] [X]
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Given the above pixel C, we only care about the values with numbers. We can
|
||||||
|
find the gradient in the X and Y respectively using
|
||||||
|
|
||||||
|
{{{
|
||||||
|
Delta_x = 8 - 2 = 6
|
||||||
|
Delta_y = 7 - 3 = 4
|
||||||
|
}}}
|
||||||
|
|
||||||
|
Therefore our vector is the matrix consisting of 6 over 4. To find the
|
||||||
|
direction of this vector we can take
|
||||||
|
|
||||||
|
{{{
|
||||||
|
arctan(6 / 4) = 56.309 degrees
|
||||||
|
}}}
|
||||||
|
|
||||||
|
This of course was on a single pixel value but the same concept applies for [[RGB]]
|
||||||
|
or [[CMYK]] colorspaces.
|
@ -4,7 +4,7 @@ Computer graphics is the field focusing on making a computer generate an image.
|
|||||||
|
|
||||||
== Image processing ==
|
== Image processing ==
|
||||||
|
|
||||||
* [[gradiant_vectors]]
|
* [[gradient_vectors]]
|
||||||
|
|
||||||
== User interfaces ==
|
== User interfaces ==
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user