outline from gadient mask

  • 226 Replies
  • 78850 Views
*

yotamarker

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1003
  • battle programmer
    • battle programming
Re: outline from gadient mask
« Reply #75 on: April 23, 2017, 02:51:34 pm »
this was so insane I am now taking suggestions for the next vid's music

*

yotamarker

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1003
  • battle programmer
    • battle programming
Re: outline from gadient mask
« Reply #76 on: April 23, 2017, 08:34:14 pm »
the survey corp took out the female titan


*

Korrelan

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1454
  • Look into my eyes! WOAH!
    • YouTube
Re: outline from gadient mask
« Reply #77 on: April 23, 2017, 09:28:04 pm »
So you have implemented a pallet extraction/ highlight to pick out the tones in the girls skin/ leaf colours?

http://aidreams.co.uk/forum/index.php?topic=12069.msg46524#msg46524

Cool.  Though like you said…

Quote
the problem with your solution is that it is specific for that image but what if it's a dog in front of yellow autom leafs or a tanned girl in front of pink leafs

This problem still exists.

Good progress though.

 :)
It thunk... therefore it is!...    /    Project Page    /    KorrTecx Website

*

yotamarker

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1003
  • battle programmer
    • battle programming
Re: outline from gadient mask
« Reply #78 on: April 25, 2017, 04:59:03 pm »
could you explain corner detection algorithm ?
also do you have any point of interest regarding motion detection ? like should I detect the overall movement or all movements or other stuff

*

yotamarker

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1003
  • battle programmer
    • battle programming
Re: outline from gadient mask
« Reply #79 on: April 25, 2017, 05:00:44 pm »
also Shi-Tomasi corner-detector and Lukas-Kanade algorithm  ?

*

keghn

  • Trusty Member
  • *********
  • Terminator
  • *
  • 824
Re: outline from gadient mask
« Reply #80 on: April 26, 2017, 01:18:01 am »
Shi-Tomasi corner-detector: 
https://en.wikipedia.org/wiki/Corner_detection#The_Shi_and_Tomasi_corner_detection_algorithm

 If you like it use it. Nothing wrong with it. Corners are sub feather in a image that make up an out line of a object.
 So are straight line the the:

https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm

https://en.wikipedia.org/wiki/Xiaolin_Wu%27s_line_algorithm

https://en.wikipedia.org/wiki/Line_drawing_algorithm

 A out line can have set of sub features that identify it like a finger print.  Like six corners and six straight lines.
 So you can find people and planes in a video at light speed. Like a index at the back of a book.

https://en.wikipedia.org/wiki/Marching_squares

https://en.wikipedia.org/wiki/Contour_line

optical flow is high lighting the change between two images: 

 



 



*

yotamarker

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1003
  • battle programmer
    • battle programming
Re: outline from gadient mask
« Reply #81 on: April 26, 2017, 03:21:05 am »
that's the problem I don't understand it the way wiki explains it

*

yotamarker

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1003
  • battle programmer
    • battle programming
Re: outline from gadient mask
« Reply #82 on: April 26, 2017, 05:02:22 am »
I hate opencv so much I can't use it on vb.net and it just appears in too many search results like some retard commercial. the same goes for matlab.

*

yotamarker

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1003
  • battle programmer
    • battle programming
Re: outline from gadient mask
« Reply #83 on: April 27, 2017, 05:49:44 am »
I have a question...
an image of 9 by 9 pixel has 512 possibilities ?

*

yotamarker

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1003
  • battle programmer
    • battle programming
Re: outline from gadient mask
« Reply #84 on: April 27, 2017, 05:55:58 am »
nope its 2^81

*

Korrelan

  • Trusty Member
  • ***********
  • Eve
  • *
  • 1454
  • Look into my eyes! WOAH!
    • YouTube
Re: outline from gadient mask
« Reply #85 on: April 27, 2017, 10:55:16 am »
Basic Feature Detection

With any kind of feature detection you are basically looking for a pattern within a pattern.



The simplest method is to apply a line/ outline convolution filter to your image and then search for known recognisable pixel patterns. The simplest pixel pattern is a 3x3 block (fig A); there are various ways of defining the block but the simplest is to assign a binary value to each surrounding pixel from X/Y.  So 20 using this encoding method would equal a P1/ top left right angle. 

This is the method I used do get the outlines of the shapes in this vid. Except I use the recognised binary shapes to move a point around a perimeter. I could easily mark the corners of shapes by noting the binary numbers for corners. Etc.



A 5x5 (top right) or greater dimension block can be used but you would probably need a different encoding method; storing the pixel vector positions relative to the centre x,y as s simple list of vectors to be checked for example.

You then scan your image, summing the binary values of the surrounding pixels of each x,y point; the value returned can be easily checked against an array of known shapes (P1). Store the positions/ vectors in an array/ stack. This method is easy because you are just checking a one byte (0 to 255) value against a know array of byte/ shape values.

Shape Recognition

Once you have all the vectors for the found feature patterns and their relative positions to each other you can then find shapes (fig B) by checking for alignments etc.

Eigen Vectors

This is another method for checking one pattern against another without using an outline convolution filter; though usually a contrast filter is applied to bring the values of the image being checked in line with our set of eigen features

The RGB or Greyscale values of the surrounding pixels of the x,y point being scanned are subtracted from the pixel values being checked and run through a linear distance formula to see how similar they are. Rather than a simple binary array of numbers to check against; it uses small shaded bitmaps similar to (fig A top right).

‘s1=greyscale for position 1 (on binary grid above)
‘c1=greyscale for position 1 from the image being checked.

.v1=s1-c1
‘do same for all nine surrounding pixels storing V#

.dist=SQR((v1*v1)+(v2*v2)+(V3+… for all nine surrounding pixels.

The dist returned is a measure of how similar the block of pixels being checked is to the block of pixels in our stored array of eigen corner shapes.

http://www.wikihow.com/Find-the-Distance-Between-Two-Points

This method has the advantage that ‘eyes/ mouths’ can be defined as small blocks of pixels that can be checked against an image.

Motion Detection/ Optical Flow

If you have the relative positions for known eigen features within an image you can check them against the next image in the video stream and measure the displacement to log what’s moved/ how far and how fast.

Other Methods

There a loads of other methods or finding corners/ features in images. You could for example detect pixel changes around a circumference from your x, y scan point (fig C) using the relative angles to find corners.

You could use the binary method to get a rough idea where the corners are and then apply a more precise method to each found vector to weed out false positives.

My Method

Because my AGI is based on the human connectome/ nervous system I use a model of the human visual system to detect features.



Neurons in the AGI’s visual cortex become trained to recognise lines/ corners etc through experience and only fire when their receptive fields detect their chosen pattern of inputs.  This is like running several convolution filters at once as scale/ rotation invariance/ gradients and movement can all be learned by the same V! cortex model.

:)
« Last Edit: April 27, 2017, 11:19:34 am by korrelan »
It thunk... therefore it is!...    /    Project Page    /    KorrTecx Website

*

yotamarker

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1003
  • battle programmer
    • battle programming
Re: outline from gadient mask
« Reply #86 on: April 27, 2017, 04:40:53 pm »
so what would be the difference between 3X3 and 5X5 corners ?

*

yotamarker

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1003
  • battle programmer
    • battle programming
Re: outline from gadient mask
« Reply #87 on: April 27, 2017, 04:50:32 pm »
also I don't understand how you separated the shapes

*

keghn

  • Trusty Member
  • *********
  • Terminator
  • *
  • 824
Re: outline from gadient mask
« Reply #88 on: April 27, 2017, 06:53:29 pm »
 A 5x5 pixel would be be more easy to see from the background noise.

 There are number of ways of getting an edge. But NN cut the picture up in squares:

http://www.imageprocessingplace.com/downloads_V3/root_downloads/tutorials/contour_tracing_Abeer_George_Ghuneim/alg.html

 in this overly super simplified example.

 On the fist level the colors are averaged out in each square. On the next level square are compared to another near by
squares, using XOR logic. IF there is a difference between the two then there is line or contour there that belong to
a outline.

 Big the squares the more it does auto blurring.

 There are other methods the use are kenel.
 Finding the Edges, The Sobel Operator: 


 


*

yotamarker

  • Trusty Member
  • **********
  • Millennium Man
  • *
  • 1003
  • battle programmer
    • battle programming
Re: outline from gadient mask
« Reply #89 on: April 27, 2017, 08:44:57 pm »
Code
I never understand what those computerphiles try to explain.

is this the list of corner possibilities ? :

code]Public Class Form1
    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        'Dim i As Integer = 512
        'Dim s As String = Convert.ToString(i, 2).PadLeft(9, "0"c) '32 bits
        Dim str1 As String = ""
        Dim x As Integer = 0
        For index = 0 To 255
            str1 = Convert.ToString(index, 2).PadLeft(9, "0"c)
            x = str1.Substring(4, 1)
            If x = 1 Then
                TextBox1.Text &= str1.Substring(0, 3) & Environment.NewLine
                TextBox1.Text &= str1.Substring(3, 3) & Environment.NewLine
                TextBox1.Text &= str1.Substring(6, 3) & Environment.NewLine
                TextBox1.Text &= Environment.NewLine
            End If

        Next
    End Sub
End Class

 


Requirements for functional equivalence to conscious processing?
by DaltonG (General AI Discussion)
November 19, 2024, 11:56:05 am
Will LLMs ever learn what is ... is?
by HS (Future of AI)
November 10, 2024, 06:28:10 pm
Who's the AI?
by frankinstien (Future of AI)
November 04, 2024, 05:45:05 am
Project Acuitas
by WriterOfMinds (General Project Discussion)
October 27, 2024, 09:17:10 pm
Ai improving AI
by infurl (AI Programming)
October 19, 2024, 03:43:29 am
Atronach's Eye
by WriterOfMinds (Home Made Robots)
October 13, 2024, 09:52:42 pm
Running local AI models
by spydaz (AI Programming)
October 07, 2024, 09:00:53 am
Hi IM BAA---AAACK!!
by MagnusWootton (Home Made Robots)
September 16, 2024, 09:49:10 pm
LLaMA2 Meta's chatbot released
by spydaz (AI News )
August 24, 2024, 02:58:36 pm
ollama and llama3
by spydaz (AI News )
August 24, 2024, 02:55:13 pm
AI controlled F-16, for real!
by frankinstien (AI News )
June 15, 2024, 05:40:28 am
Open AI GPT-4o - audio, vision, text combined reasoning
by MikeB (AI News )
May 14, 2024, 05:46:48 am
OpenAI Speech-to-Speech Reasoning Demo
by MikeB (AI News )
March 31, 2024, 01:00:53 pm
Say good-bye to GPUs...
by MikeB (AI News )
March 23, 2024, 09:23:52 am
Google Bard report
by ivan.moony (AI News )
February 14, 2024, 04:42:23 pm
Elon Musk's xAI Grok Chatbot
by MikeB (AI News )
December 11, 2023, 06:26:33 am

Users Online

224 Guests, 0 Users

Most Online Today: 532. Most Online Ever: 2369 (November 21, 2020, 04:08:13 pm)

Articles