-
Notifications
You must be signed in to change notification settings - Fork 0
Ruby library for building a mosaic image from several sources. STILL UNDER CONSTRUCTION! I will announce an official working release.
mindtonic/mosaic
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
LENNON MOSAIC APPLICATION STORIES ================================= User/Role Contexts: SysAdmin - System admin works with the Mosaic from the command line Admin - Admin works with the mosaic from the application interface System - Behind the Scenes processing User - 3rd party visitor who views and interacts with the Mosaic Classes: Mosaic - The main class, responsible for creating and managing the Mosaic itself Source - Class representing a source of image content, this class is responsible for pulling the new content Image - Class representing a single image Other: The Application - the website interface for both viewing and managing the Mosaic ------------------------------ Iteration Descriptions ------------------------------ Step One: will mostly be run by me at the command line to get the project off the ground, make sure the actual image manipulation parts are working and compiling the mosaic properly and the outputted image is what we want it to be. This section will be tested using a single image feed from photobucket. Step Two: will be to add genuine feedback to the script so that we can see what is happening as we go along. This process takes a considerable amount of time, so good user communication will be key. Step Three: will then be to add the ability to record and save the information on the images, save the master image, and generate the new mosaic from the existing data. This step is expected to speed up the image creation process. Step Four: will be adding multiple Image feed sources to the Mosaic engine. At this point we will add the Creative Allies feed and the YouTube feed. Step Five: will be to enhance the presentation of the mosaic into both a standard output image and a javascript driven interactive table which will (hopefully) look feel and work like the YouTube flash based one. Step Six: will be to move all of this into the Creative Allies application and create the ability for any admin (You, Josh, etc.) to manage the image sources and images used to create the mosaic. ------------------------------ 1. Get It Working ------------------------------ Get It Working will mostly be run by me at the command line to get the project off the ground, make sure the actual image manipulation parts are working and compiling the mosaic properly and the outputted image is what we want it to be. This will establish the basic test suite and code library and will include local files for testing. 1. SysAdmin Instates the Class The SysAdmin starts the script and it has a master image and a source. 2. SysAdmin Assigns A Master The SysAdmin assigns the Master Image to an Instance Variable 3. SysAdmin Resizes Master The SysAdmin resizes the master image, which is not saved at this time 4. SysAdmin Pulls Image Tiles The SysAdmin pulls an array of URL's from a predefined source. These are our Image Tiles. 5. SysAdmin Gets Average Color The SysAdmin calculates the average color of each Image Tile And assigns it to an array with the average as the key and the image as the value. 6. The SysAdmin Iterates Over The Master The SysAdmin iterates over the master image replacing each pixel with the closest average matching Tile 7. The SysAdmin Saves the new Master The SysAdmin saves the new master image ------------------------------ 2. Feedback and Operation ------------------------------ Feedback and Operation will be to add genuine feedback to the script so that we can see what is happening as we go along. This process takes a considerable amount of time, so good user communication will be key. 8. SysAdmin starts the script The SysAdmin starts the script and sees a Welcome Message 9. System gives feedback on the master image When processing the Master Image, the system gives feedback and progress reports 10. System gives feedback on the source images When processing the Source Images, the system gives feedback and progress reports 11. System gives feedback while creating and saving the Mosaic When creating and saving the mosaic, the system gives feedback and progress reports 12. System runs the entire process from the command line start When the SysAdmin enters the start command, a Mosaic is created ------------------------------ 3. Error Checking ------------------------------ The two key areas where errors are prone to occur are when the image is downloaded, and when the best image is calculated. Error proof both of these areas and delete the guilty image from the Source Images queue. 13. Catching Bad Image Downloads What happens when a Source Image download fails? ------------------------------ 4. HSL Calculation ------------------------------ 14. Generating the HSL Value for an Image Creating the HSL value for an Image ------------------------------ 5. Refactor 1 ------------------------------ Redesign the way that image processing is handled by moving the master image into its own class. Then rebuild the pattern for the Source Images so that they are immediately resized to their thumbnail size after download, that way the color average calculations are operating on a much smaller image. 15. Download and Resize an image during initializiation ------------------------------ 6. Data Storage ------------------------------ Store the Source Image information in a database and work out a better comparison algorithm using a database query to find the best color match. Try a Mongo database with MongoMapper as the first database try. +++++++ EVERYTHING BELOW THIS LINE IS A BRAINSTORM WAITING TO BE IMPLEMENTED +++++++++++ ------------------------------ SysAdmin & System Interaction ------------------------------ SysAdmin Starts Mosaic The SysAdmin opens a shell, types a command and sees a welcome message and a prompt waiting for instruction SysAdmin Assigns a Master The SysAdmin assigns a value to the Master Class System Resizes Master The System resizes the Master Image according to the requirements System Saves Master The System saves the Master Image to the mosaic_store SysAdmin Adds a Content Source The SysAdmin inputs the command to add a new Content Source, which is stored in a flat file or other storage system SysAdmin Pulls new Content The SysAdmin inputs the command to pull new content System Looks For New Content The System goes through all Content Sources, looking for new content System Finds New Content The System pulls the image associated with the new content System Saves the Image The System saves the original version of the image into the mosaic_store System Calculates the Average Color The System collects all of the pixels from the image and calculates the Average Color System Resizes the Image The System creates a resized version of the image to use in the Mosaic System Saves the Image The System saves the resized version of the image System Save Image Information The System saves the image information into a flat file or other storage system SysAdmin Orders new Mosaic The SysAdmin inputs the command to build the new mosaic The System reads the Master into an Array The System reads the pixel colors into an Array The System Compares to Content The System finds the Content Item with the closest Average Color to the pixel The System Compiles the new Image The System rolls through the array and compiles the images into a new master The System Saves the new Image The System saves the new Image and records the most recent version The System Saves the Array The System saves the Array of pixels into store so that the tabled version can be rendered SysAdmin Views Mosaic The SysAdmin enters the command to view the new Mosaic System Shows Mosaic The System opens a browser and displays the saved Mosaic Image SysAdmin Schedules System The SysAdmin enters the command to schedule the System to refresh the Mosaic ------------------------------ Admin Interaction ------------------------------ Admin Starts Mosaic The Admin starts Mosaic through the application Admin Pulls new Content The Admin clicks the link to pull new Content The System goes through all Content Sources, looking for new content System Processes new Content The System processes the new content and stores the information in a flat file or other storage system Admin Builds new Mosaic The Admin clicks the link to rebuild the Mosaic The System builds the Mosaic based on the existing Content and saves the output Admin Views new Mosaic The Admin clicks the link to view the Mosaic The System displays the Mosaic in the current browser window ------------------------------ User Interaction ------------------------------ User Views Mosaic The User clicks a link The System displays the Mosaic in the current browser window ------------------------------ System Interaction ------------------------------ System Starts Mosaic on Schedule The System starts Mosaic at the Scheduled time System Pulls new Content The System goes through all Content Sources, looking for new content System Processes new Content The System processes the new content and stores the information in a flat file or other storage system System Builds new Mosaic The System builds the Mosaic based on the existing Content and saves the output ------------------------------ Future Development ------------------------------ + Use the MongoDB storage system to hold all of the data for the mosaic. Each Mosaic can be its own document + Use pubsubhubbub technology to receive new Content as it is published, then rebuild the Mosaic every hour
About
Ruby library for building a mosaic image from several sources. STILL UNDER CONSTRUCTION! I will announce an official working release.
Resources
Stars
Watchers
Forks
Packages 0
No packages published