drawing - Dave's Blog

Search
My timeline on Mastodon

GitHub - asciimoo/drawille

2014 May 21, 1:54

drawille - Drawing in terminal with unicode braille characters

Uses the Unicode Braille characters to make advanced (non-)ASCII art.

PermalinkCommentshumor technical art

A Turing Machine Overview

2010 Mar 28, 4:37Mike Davey builds a Turing Machine drawing ones and zeros on tape. Pretty cool, but the tape length is only finite.PermalinkCommentsfsm turing-machine video technical

Self-Portrait Machine - we make money not art

2009 Jul 27, 4:29"Jen Hui Liao's Self-Portrait Machine is a device that takes a picture of the sitter and draws it but with the model's help. The wrists of the individual are tied to the machine and it is his or her hands that are guided to draw the lines that will eventually form the portrait." With video!PermalinkCommentsvideo drawing art technology machine robot automation self-portrait

PowerShell Scanning Script

2009 Jun 27, 3:42

I've hooked up the printer/scanner to the Media Center PC since I leave that on all the time anyway so we can have a networked printer. I wanted to hook up the scanner in a somewhat similar fashion but I didn't want to install HP's software (other than the drivers of course). So I've written my own script for scanning in PowerShell that does the following:

  1. Scans using the Windows Image Acquisition APIs via COM
  2. Runs OCR on the image using Microsoft Office Document Imaging via COM (which may already be on your PC if you have Office installed)
  3. Converts the image to JPEG using .NET Image APIs
  4. Stores the OCR text into the EXIF comment field using .NET Image APIs (which means Windows Search can index the image by the text in the image)
  5. Moves the image to the public share

Here's the actual code from my scan.ps1 file:

param([Switch] $ShowProgress, [switch] $OpenCompletedResult)

$filePathTemplate = "C:\users\public\pictures\scanned\scan {0} {1}.{2}";
$time = get-date -uformat "%Y-%m-%d";

[void]([reflection.assembly]::loadfile( "C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll"))

$deviceManager = new-object -ComObject WIA.DeviceManager
$device = $deviceManager.DeviceInfos.Item(1).Connect();

foreach ($item in $device.Items) {
        $fileIdx = 0;
        while (test-path ($filePathTemplate -f $time,$fileIdx,"*")) {
                [void](++$fileIdx);
        }

        if ($ShowProgress) { "Scanning..." }

        $image = $item.Transfer();
        $fileName = ($filePathTemplate -f $time,$fileIdx,$image.FileExtension);
        $image.SaveFile($fileName);
        clear-variable image

        if ($ShowProgress) { "Running OCR..." }

        $modiDocument = new-object -comobject modi.document;
        $modiDocument.Create($fileName);
        $modiDocument.OCR();
        if ($modiDocument.Images.Count -gt 0) {
                $ocrText = $modiDocument.Images.Item(0).Layout.Text.ToString().Trim();
                $modiDocument.Close();
                clear-variable modiDocument

                if (!($ocrText.Equals(""))) {
                        $fileAsImage = New-Object -TypeName system.drawing.bitmap -ArgumentList $fileName
                        if (!($fileName.EndsWith(".jpg") -or $fileName.EndsWith(".jpeg"))) {
                                if ($ShowProgress) { "Converting to JPEG..." }

                                $newFileName = ($filePathTemplate -f $time,$fileIdx,"jpg");
                                $fileAsImage.Save($newFileName, [System.Drawing.Imaging.ImageFormat]::Jpeg);
                                $fileAsImage.Dispose();
                                del $fileName;

                                $fileAsImage = New-Object -TypeName system.drawing.bitmap -ArgumentList $newFileName 
                                $fileName = $newFileName
                        }

                        if ($ShowProgress) { "Saving OCR Text..." }

                        $property = $fileAsImage.PropertyItems[0];
                        $property.Id = 40092;
                        $property.Type = 1;
                        $property.Value = [system.text.encoding]::Unicode.GetBytes($ocrText);
                        $property.Len = $property.Value.Count;
                        $fileAsImage.SetPropertyItem($property);
                        $fileAsImage.Save(($fileName + ".new"));
                        $fileAsImage.Dispose();
                        del $fileName;
                        ren ($fileName + ".new") $fileName
                }
        }
        else {
                $modiDocument.Close();
                clear-variable modiDocument
        }

        if ($ShowProgress) { "Done." }

        if ($OpenCompletedResult) {
                . $fileName;
        }
        else {
                $result = dir $fileName;
                $result | add-member -membertype noteproperty -name OCRText -value $ocrText
                $result
        }
}

I ran into a few issues:

PermalinkCommentstechnical scanner ocr .net modi powershell office wia

Pong: Interactive Pong May be Most Fun You Can Have With a Whiteboard

2008 Nov 7, 4:06'A live "drawing on whiteboard" version [of pong], mixing electronics with the joy of drawing on, wiping off and repositioning your playing bat. Check it out, thrill to the high-speed action and grin at the ultimate use of a whiteboard: so much better than the usual business drivel that gets drawn on them.'PermalinkCommentshumor video interactive whiteboard pong game

Flickr: Seattle Municipal Archives

2008 Aug 25, 11:39"The Seattle Municipal Archives documents the history, development, and activities of the agencies and elected officials of the City of Seattle. Strengths of the records include those documenting engineering, parks, urban planning, the legislative process and elected officials. Holdings include over 6,000 cubic feet of textual records; 3,000 maps and drawings, 3,000 audiotapes; hundreds of hours of motion picture film; and over 1.5 million photographic images of City projects and personnel."PermalinkCommentsvia:swannman photo flickr seattle history public-domain

Kew Tree Top Walkway by Marks Barfield Architects

2008 Jun 19, 4:07"An elevated walkway through the trees by Marks Barfield Architects has opened at Kew Gardens in London." Brings up memories of so many intricate treehouse drawings as a child.PermalinkCommentsnature london design architecture tree

twistori

2008 Apr 29, 7:56"this is the first step in an ongoing social experiment, based on twitter. inspired by wefeelfine and drawing data from summize, hand-crafted by amy hoy and thomas fuchs."PermalinkCommentsvia:ethan_t_hein api twitter social art visualization

Crayon Physics Deluxe

2008 Apr 2, 6:21Recommended by PA guys: "Crayon Physics Deluxe is a 2D physics puzzle game, in which you get to experience what it would be like if your drawings would be magically transformed into real physical objects. Solve puzzles with your artistic vision and creatiPermalinkCommentspenny-arcade crayon crayon-physics game games physics drawing

Juanita Beach Visit and Map

2008 Mar 7, 3:26

Don't Feed the Ducks SignTwo weekends ago it was actually sunny and kind of warm so Sarah and I went down to Spud Fish and Chips and Juanita Beach Park. We ate fish and chips on the dock. I took a few pictures and this time actually put some geographical information on Flickr so now I've got a map of my tiny fish and chips journey. On the map click on the floating marks to view the associated photos.

Flickr provides access to the geo data associated with your photos via GeoRSS feeds. And Google Maps displays GeoRSS feed content on their maps allowing you even to edit the data but doesn't appear to let you easily export the GeoRSS. Live Maps does the inverse, allowing you to create and export GeoRSS data but not import it. I'd like both please. Oh well.

PermalinkCommentsmap photo personal fish-and-chips juanita-beach

Ogle Earth: Drawing in Google Maps vs drawing in Live Local: Which is better?

2008 Mar 4, 11:01Google's My Maps: "And now, this morning, Google has updated its Maps product yet again, adding "My Maps", user-generated collections of annotated placemarks, lines, and polygons."PermalinkCommentsgoogle map microsoft live georss blog article

retrievr - search by sketch / search by image

2007 Feb 26, 12:13Search for pictures by drawing you own or entering the URL of an image. The tool will find images that look similar.PermalinkCommentsretrievr flickr search images tool neat-fp
Older Entries Creative Commons License Some rights reserved.