From 9699b95eaa807a3cfdeb7f6e861467a62f4257b9 Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Mon, 3 Oct 2022 18:45:01 -0400 Subject: [PATCH] Update for 03-10-22 18:45 --- tech/gradiant_vectors.wiki | 4 ---- tech/gradient_vectors.wiki | 41 ++++++++++++++++++++++++++++++++++++++ tech/graphics.wiki | 2 +- 3 files changed, 42 insertions(+), 5 deletions(-) delete mode 100644 tech/gradiant_vectors.wiki create mode 100644 tech/gradient_vectors.wiki diff --git a/tech/gradiant_vectors.wiki b/tech/gradiant_vectors.wiki deleted file mode 100644 index 107492f..0000000 --- a/tech/gradiant_vectors.wiki +++ /dev/null @@ -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]] diff --git a/tech/gradient_vectors.wiki b/tech/gradient_vectors.wiki new file mode 100644 index 0000000..2c4f38a --- /dev/null +++ b/tech/gradient_vectors.wiki @@ -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. diff --git a/tech/graphics.wiki b/tech/graphics.wiki index 1e163ab..71db1ec 100644 --- a/tech/graphics.wiki +++ b/tech/graphics.wiki @@ -4,7 +4,7 @@ Computer graphics is the field focusing on making a computer generate an image. == Image processing == -* [[gradiant_vectors]] +* [[gradient_vectors]] == User interfaces ==