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!
video drawing art technology machine robot automation self-portrait 2009 Jul 24, 5:13"Question Box, a service which effectively provides a speaking Wikipedia for people in remote villages in India and Africa without access to the internet and those unable to read."
africa wikipedia internet literacy india 2009 Jul 20, 8:07Includes plenty of variations on the quote like Grey's Law: "Any sufficiently advanced incompetence is indistinguishable from malice."
humor quote paranoia 2009 Jul 19, 11:44
I've redone my blog's layout to remind myself how terrible CSS is -- err I mean to play
with the more advanced features of CSS 2.1 which are all now available in IE8. As part of the new layout I've included my Delicious links by default but at a smaller size and I've replaced the
navigation list options with Technical, Personal and Everything as I've heard from folks that that would actually be useful. Besides the layout I've also updated the back-end, switching from my
handmade PHP+XSLT+RSS/Atom monster to a slightly less horrible PHP+DB solution. As a result everything should be much much faster including search which, incidentally, is so much easier to
implement outside of XSLT.
blog database redisgn xslt mysql homepage 2009 Jul 11, 2:47
On Friday Sarah and I went to the
Mariners vs Rangers game at Safeco Field with Eric and Jane. The Mariners lost but then before the game the announcement made outside the stadium guaranteed the best service and a good time, not a
winning game -- and they were right about the good time.
The night before, we saw The Hangover which was very funny and included Zach Galifianakis who was great. Incidentally, take a look at some of Zach's
Between Two Ferns.
Last weekend Sarah and I mounted the TV to the wall which was exciting and we saw a mouse in the house!
tv baseball personal mouse house 2009 Jul 10, 9:43"This goes directly to why most folks use IE6: they don't have a choice. Three out of four IE6 users on Digg said they can't upgrade due to some technical or workplace reason."
ie digg ie6 statistics web development browser technical 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:
- Scans using the Windows Image Acquisition APIs via COM
- Runs OCR on the image using Microsoft Office Document Imaging via COM (which may already be on your PC if you have Office installed)
- Converts the image to JPEG using .NET Image APIs
- 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)
- 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:
- MODI doesn't seem to be in the Office 2010 Technical Preview I installed first. Installing Office 2007 fixed that.
- The MODI.Document class, at least via PowerShell, can't be instantiated in a 64bit environment. To run the script on my 64bit OS I had to start powershell from the 32bit cmd.exe
(C:\windows\syswow64\cmd.exe).
- I was planning to hook up my script to the scanner's 'Scan' button, but
HP didn't get the button working for their Vista driver. Their workaround is "don't do that!".
- You must call Image.Dispose() to get .NET to release its reference to the corresponding image file.
- In trying to figure out how to store the text in the files comment, I ran into a dead-end trying to find the corresponding setter for GetDetailsOf which folks like James O'Neil use in PowerShell for interesting ends.
technical scanner ocr .net modi powershell office wia 2009 Jun 25, 1:53"The document provides practical best practices related to specifying the language of content that HTML content authors can use to ensure that their HTML is easily adaptable for an international
audience. These are best practices that are best addressed from the start of content development if unnecessary costs and resource issues are to be avoided later on."
language i18n internationalization html w3c xml reference xhtml technical 2009 Jun 25, 11:45"Cory Doctorow's Futuristic Tales of the Here and Now is the Creative Commons comics adaptation of six short stories by Boing Boing editor and science-fiction writer Cory Doctorow... The result are
eight Creative Commons mobile comics specifically designed for iPhone, iPod touch and Android devices."
cory-doctorow comic android iphone mobile download book free 2009 Jun 24, 1:41"A nondescript exterior and a yard dominated by headstones give no indication of the residential nature of this historic church in Kyloe, Northumberland. A couple decided to purchase and readapt the
structure, investing nearly three times the purchase price into renovations over the course of several years."
church church-home house home england for:hellosarah photo 2009 Jun 20, 9:43How to use the WIA APIs in C#. WIA is Windows API to get images from scanners and cameras. And, as I found out, if you want to use the API in PowerShell try '$deviceManager = new-object -ComObject
WIA.DeviceManager'
video scanner api wia csharp howto programming camera image photo .net webcam technical 2009 Jun 20, 9:39If you have Office installed you may have an OCR library sitting on your hard drive just waiting to be used via C#...
ocr microsoft office .net automation scanner camera windows technical 2009 Jun 19, 3:27You must wonder if Bruce Schneier is having trouble selling his laptop just because he's Bruce Schneier and he announced his sale on his blog. I thought his description was funny though: "But I still
want to sell the computer, and I am pissed off at what is essentially a denial-of-service attack." A scam or attack to you or me is at worst a DoS to Bruce Schneier.
bruce-schneier ebay fraud security dos 2009 Jun 19, 8:07
The weekend before the previous, Sarah and I moved our belongings into the
new house and spent a lot of time packing and unpacking, and now we're officially living there (interested Facebook friends can find my
new address or just ask me). The Saturday of the previous weekend Sarah's family came over for a half house warming and half Sarah's birthday celebration which was fun and served to force us to do
more unpacking and forced me to take trips to Home Depot, Bed Bath and Beyond, etc. On Sunday, Sarah and I went out to her favorite restaurant and she opened her gifts that I had to hide to keep
her from opening before her birthday. Happy Birthday Sarah!
While at Home Depot I had trouble finding what I was actually looking for, but I did find everything I needed to terminate the Cat5e cables that are wired in the house. Each room has a wall plate
with two RJ45 sockets, both sockets wired to Cat5e cable. One of the cables per plate was already hooked up to a standard phone service punchdown board and the other cables per plate were all
hanging unterminated next to the punchdown board. So now I've terminated them all with RJ45 connectors and hooked them up to my hub, wireless router, cable modem, etc. I had the same sort of fun
setting all that up as I did playing with model train sets as a child. Hopefully no therapy will be required to figure out why that is.
personal2 train address sarah house new-house birthday 2009 Jun 10, 12:17"Bruce pointed out in his return email that while the fraud pattern was a good match for escrow, the transaction size wasn't: since the item exchanged in the eBay transaction he highlighted was sold
for only $500, the price of an escrow agent would have been hard to justify. He's right."
blog security economics article bruce-schneier Bob-Blakley ebay 2009 Jun 8, 3:40I didn't hear about this at the time, but a sixth Hitchhikers Guide novel will be written by Eoin Colfer. This article has some quotes from Eoin about it and big-shoe filling is addressed. Also in
the article is a clip of the voice actor of Arthur Dent from the radio series as Arthur Dent complaining about being brought back to life that had been played on BBC Radio.
hhgttg douglas-adams eoin-colfer and-another-thing book news audio 2009 Jun 2, 4:00"A notice was sent out by the real estate department with the provocative subject line Campus notification - Building 7: Marking Boring Locations."
humor english language boring 2009 Jun 1, 11:07
When I heard that
Live Search is now Bing one of my initial thoughts was how'd they get that domain
name given
the unavailability of pronouncable four letter .COM domain names. Well, the names been used in the past.
Here now, via the
Wayback Machine is a brief, somewhat speculative, and ultimately anticlimactic
history
of bing.com:
-
2003 July: The first archived version of bing.com features "bing! is a small device (e.g., possibly even a small
Band-Aid(R)-like sticker!) that vibrates when a person's cell phone rings." I can't recall 2003 cell phones, were they big enough to require this device?
-
2004 August: Site for the same device is rewritten and looks much better, IMHO.
-
2006 June: The domain is now parked by easyDNS. I guess the "bing!" device didn't work out?
-
2006 November: Its now "BING*" and they won't say what they're working on ("we're still in stealth mode") but they are
hiring C#/.NET developers.
-
2007 January: And they're gone. Without even exiting stealth mode. Too bad, I liked their logo. Their domain is now for
sale...
-
2007 February: Looks like EasyMail buys the domain and offers a physical mailing service in Australia: "By simply clicking
a button on your computer, mail is beamed electronically to a bing post office. Your mail is automatically printed, folded, enveloped and dispatched into the Australia Post network the very same
day."
-
Present: Now its the new home for Live Search of course.
The new name reminds me of the show Friends. Also, I hope they get a new favicon - I don't enjoy the stretched 'b' nor its color scheme.
microsoft technical domain history search archive dns bing 2009 May 31, 7:52"jeffgrako: HOLLA IF YOUR AT THE #FIRE"
humor video satire culture internet fire college phone 2009 May 29, 9:01"These inks are completely invisible to the human eye yet can be seen by using a device which can see in the infrared range - such as our modified cameras and camcorders. These inks do not fluoresce
in the visible range, cannot be seen with ultraviolet lights and cannot be seen by the human eye alone." Via and not via .
ir ir-paint ink purchase