Shape Identification and Aesthetic Metric 01/19/2018

Shape Identification

Shape identification is in tip-top shape. The program can correctly identify squares, triangles, lines, and circles, including when they have been twisted in various directions.

What it is doing nowwwwww
When given “odd” shapes, the program does a couple predictable odd things.

Realistically, the tested images will not be in this sort of environment. Rather, there might not be consistent shapes that can be identified. Here are two examples from an image generated by cellular automata, coded by me, and l-systems, coded by Taylor Baer, that demonstrate what it does in more realistic scenarios.

When given a small piece of one of Taylor Baers L-Systems, the program responds well in identifying triangles.

However, when given a jumbled mess of cellular automata, the program tends to judge things as mostly square, and doesn’t know what to make of the rest.

Both these behaviors are consistent with what we observed above. What it means moving forward, is that as programmers we cannot blindly use the numbers presented in the GUI, but rather have to pay attention to what is going on behind the curtain. The program is judging a blob based on what it is MOST like, and contains a list of percentages of similarities between different shapes.

When developing an aesthetic measure, it is this list that should be used with care.

Aesthetic Metric

Rough Start

For a rough start to my aesthetic metric, I will say that my example Matisse painting is the height of greatness, and anything the diverges from this should be considered less than perfect.

Matisse has:

Lines: 19

Circles: 1

Squares: 12

Triangles: 2

After developing a chi squares test for this, we come out with an aesthetic metric that will rate Matisse as 1.0, and anything that divulges from it, a lower score.

Examples of how this works are shown below, where we can see that the development of smaller amounts of shapes is preferred (so long as the shapes are at least 100 pixels in size). Matisse scores perfectly.

Cool2
Score : 0.13269501879699247
automata688506722
Score : 0.22873232686316797
tester
Score : 0.43970588235294117
Mattisse example
Score : 1.0

This score is only rough right now, and represents approximately what we can do. However, it does not fully represent my hypothesis. In the future, I would like to expand it to encourage specifically the forming of larger shapes, and colors that are as different as possible. This more complex fitness test will be implemented when I have the right framework in place for it.

Reorganization

So far, testing images has been done separately from creating them. However, with a preliminary fitness score, it is now time to turn our attentions to how we can fit these together.

GUI Calls
Right now the GUI is making these calls, using the imported classes shown to calculate what it needs to display in the text fields of the GUI. In the process of activating the logic required to create lists, it also shows the image and text in the GUI. This is not longer necessary and needs to be separated from it.

Here is my proposed plan for putting the logic from the GUI in the old program.Use case program

The first step is to get the program to auto-read files at the location they are exported to.

  • Auto-read files

For each picture exported, when the score button is pressed, the program will now reread the images in. The subtle changes on the screen do not indicate much when this happens. Export causes the program to display the last file exported. The score button causes the file to read in these images, and then ends in displaying the same last image in the file. At first glance, someone might not be able to tell the program did anything. However, the colors of the image change slightly as the program adjusts them to only be three colors, so some colors disappear on screen. In addition, there are print lines that get called that make it obvious the image has been read.

  • Give files a score

A preliminary score was given out based on shapes from my Matisse painting. However, now I have also implemented a brief score that judges color as well. The program sorts the image into three colors, and the color score examines these three colors for differences. If the RGB values are significantly different, the colors will get a better score. If they are the same, not so much.

Below is how this actually works.

Judging shapes is a WIP.

  • Store score in database

Needs to happen. Me and my partner are looking into creating a small database and inputting files.

Project Plan + Timeline

This semester, or project plan is more planned than a week/month basis. From previous scheduling we have set-in-stone timeline to get things done by.

January : Rough fitness test done and implemented, mutation started

February – February 14th : Survey to students goes out

March 26 – April 6 2018 : Display date in library, 16 posters 21×21 inch of our images due by then

Below is what we want to implement as soon as possible, or rather, before the start of January.

cropped what needs to be done

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s