Tuesday, November 17, 2015

CST205 Week 4


So here we are, week 4. What's new? This week was mostly about organizing our existing code and providing sample images in a gallery. There was a new line tracing function reminiscent of a cellular automata program that used a simple rule to emphasize the outline of an object. The code for this is described in my previous post on my image manipulation library. 

                           

So this week was more organizing and getting ready to review other students than much new material for me personally. We setup our git organization at the beginning of the class so we are good to go on that front. What is exciting to me personally is our mid term assignment. I have chosen to do two filters, one that has a scuba diving theme and another that will have a microryzal theme. I am going to approach this project with the following action plan which is destined to be killed off as time goes on but reserve a minimum viable product:

  • Minimum viable product
    • Create each filter using static assets and resize the input photograph to fit a dedicated frame size
    • Create base functions that are flexible but not overkill
  • Add dynamic features
    • Continue to use a dedicated frame size
    • Apply weighted and bounded randomization to asset colorization and scaling
    • Randomize asset distribution (mushrooms, kelp, etc) based on the generated array of randomized assets
  • Implement key based scene generation 
    • Before performing asset generation or scene modification generate a randomized key of sufficient length
    • Use that key to repeatably generate a scene so you can select from an array of scene presets or use your personal past favorite preset
  • Key based dynamic scene generation with variable input image
    • Variable input image size drives output image size
    • Key determines quantity, location, colorization, and scaling of generated assets

If our scene assets are 
kelp_01.jpg
kelp_02.jpg
kelp_03.jpg
fish_01.jpg
fish_02.jpg
fish_03.jpg
bubble_01.jpg
bubble_02.jpg
bubble_03.jpg

Then we have 9 fixed assets. We can use these to generate a ton of dynamic assets for sure by changing their size, position, rotation, reflection, etc. 

asset1_minScale, asset1_maxScale, asset1_xCenter, asset1Weight, asset1ReflectionProb, .... assetN_minScale, assetN_maxScale

I'm not sure what all I would like to have in my key, but it would look something like "70,110,50, 10, 10..." Yielding a 70% minimum scale, 110% max scale, x center 50% of image width, 10% max deviation from the half way point, 10% chance of vertical reflection, and so on. Ideally you could just feed in an array of assets and this kind of key string to generate your scene based on key values. So without having to change the program I could figure out what my favorite setting is. But if I felt really crazy I could randomize that input string a bit too so that the randomization of assets is based on a randomized initial condition set. Then you could run some kind of normalization based on scene configuration variables. 

So maybe my scuba scene and the microrizal scenes would be generated by overlapping functions with different assets and configuration parameters fed into them. Kelp for example may be on the sides of the scene because they are tall and you don't want to block the focus of the picture. But if you have small mushrooms they could be on running across the whole bottom of the scene if they aren't tall.

The trick in the end is to not force the user to use a fixed picture size. I hate that. I also don't want to just plop down a clown head on the person in the center of the frame and call it a done day. Hopefully that makes sense. 

No comments:

Post a Comment