-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added if main statements to most class files - Updated current test parser to be more efficient and to pull all shapes out of a picture - Updated parser; now pseudocode is complete, working on migrating that to runnable code
- Loading branch information
1 parent
4a82b8a
commit 21f2d47
Showing
6 changed files
with
65 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
__author__ = 'Vale Tolpegin' | ||
|
||
class image_parser: | ||
#image that needs to be parsed variable | ||
import numpy as np | ||
import cv2 | ||
|
||
class image_parser: | ||
def __init__( self, *args, **kwargs ): | ||
pass | ||
|
||
def parse( picture_file ): | ||
def parse( picture_file_name ): | ||
#set image variable here with the image file picture_file | ||
|
||
#find shapes in image ( basic geometric shapes such as circles, squares, triangles, etc ) | ||
|
||
#inside of those geometric shapes, find the number of different colors | ||
#if there are 2 colors ( no more and no less ) | ||
#compare the ratio of those 2 colors | ||
#if that ratio is close to 2:1 ( shape:letter ) | ||
#return true | ||
#if there are 2 colors ( other than black, no more and no less ) | ||
#if there are 2 distinct seperate colors ( other than black ) within a couple of pixels of each other | ||
#compare the ratio of those 2 colors ( non black ) | ||
#if that ratio is close to 2:1 ( shape:letter ) | ||
#return True | ||
|
||
return false | ||
|
||
#return false | ||
if __name__ == '__main__': | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters