Image de-warping tool, and Multics/GCOS panels
Hey all, I've been doing research on Multics front panels, which it turns out are slightly different from those on the Honeywell 6000 series machines which ran GCOS, and are often confused with them. So, I've put together a Web page about them: Multics and Related 6000 Series Front Panels http://ana-3.lcs.mit.edu/~jnc/tech/multics/MulticsPanels.html and I've taken some new images, so make sure the captions are all readable. I'm having an issue with the images, though: taking a picture of a flat, rectangular panel with a camera usually produces distortion (even with the lens set to the narrowest angle possible). Does anyone know of any freeware which will fix this? The image tool I normally use (ImagePals, sort of a poor man's Photoshop) does have a 'warp' function, but it requires setting up a grid of points, and is a pain to use: optimal would be something where you mark the 4 corners, and few intermediate edge points, and the image is automagically fixed. I did find this: http://guides.library.illinois.edu/c.php?g=347882&p=2345440 but it's even hairier than the warp function in my image tool; it's very powerful (and thus complex, sigh) and can straigten out badly warped old book pages. I'm hoping there's a simpler tool, for the simple case of distortion of rectangles by a lens - does anyone know of anything? Thanks! Noel
Re: Image de-warping tool, and Multics/GCOS panels
> On Oct 27, 2017, at 11:30 AM, Noel Chiappa via cctalk > wrote: > > Hey all, I've been doing research on Multics front panels, which it turns out > are slightly different from those on the Honeywell 6000 series machines which > ran GCOS, and are often confused with them. > > So, I've put together a Web page about them: > > Multics and Related 6000 Series Front Panels > http://ana-3.lcs.mit.edu/~jnc/tech/multics/MulticsPanels.html > > and I've taken some new images, so make sure the captions are all readable. > > > I'm having an issue with the images, though: taking a picture of a flat, > rectangular panel with a camera usually produces distortion (even with the > lens set to the narrowest angle possible). > > Does anyone know of any freeware which will fix this? The image tool I > normally use (ImagePals, sort of a poor man's Photoshop) does have a 'warp' > function, but it requires setting up a grid of points, and is a pain to use: > optimal would be something where you mark the 4 corners, and few intermediate > edge points, and the image is automagically fixed. GIMP has something that does this, after a fashion. I've played with it a bit, to straighten out snapshots of book pages moderately. It doesn't work all that well, but for modest distortion (pincushion, for example) of photos taken with some care, it's probably good enough. If I want a good clean image, my solution is to take a decent photo or scan, then turn it into vector graphics. By hand is often best; I recently discovered Inkscape which is pretty friendly. paul
Re: Image de-warping tool, and Multics/GCOS panels
I move it to my android device. CS Scanner application will let you do that easily. add it to a cs scan document, then save that doc as a image (jpg) file. Convoluted, but actually less hassle with the operation of selecting the parts you want to mess with than other applications i've seen https://www.camscanner.com/ thanks Jim On 10/27/2017 8:57 AM, Paul Koning via cctalk wrote: Does anyone know of any freeware
Re: Image de-warping tool, and Multics/GCOS panels
On Fri, Oct 27, 2017 at 8:30 AM, Noel Chiappa via cctalk < cctalk@classiccmp.org> wrote: > > > Does anyone know of any freeware which will fix this? The image tool I > normally use (ImagePals, sort of a poor man's Photoshop) does have a 'warp' > function, but it requires setting up a grid of points, and is a pain to > use: > optimal would be something where you mark the 4 corners, and few > intermediate > edge points, and the image is automagically fixed. > I use gimp to to this; the UI is not intuitive but I was able to work it out through experimentation. -- Charles
Re: Image de-warping tool, and Multics/GCOS panels
Noeal asked: > I'm having an issue with the images, though: taking a picture of a flat, > rectangular panel with a camera usually produces distortion (even with the > lens set to the narrowest angle possible). > > Does anyone know of any freeware which will fix this? The image tool I > normally use (ImagePals, sort of a poor man's Photoshop) does have a 'warp' > function, but it requires setting up a grid of points, and is a pain to use: > optimal would be something where you mark the 4 corners, and few intermediate > edge points, and the image is automagically fixed. You could do it "by eye" in Photoshop and GIMP-type tools, but I believe a far better and more adjustable way is to use an operation in imagemagick called affine transformation. With this you can tweak the result programmatically to the nearest pixel-to-millimetre value to get the best result. For instance I have done an analogous task in which I removed perspective from black and white images of a WWII vehicle onto a flat elevation, so that accurate markings and camouflage patterns or precise positions of fittings can be obtained, by only knowing the basic perimeter edges. To do this, I firstly need an accurate measurement of the side of the vehicle. Its exact length, height will do. This is easily obtained from scale modelling information. In your particular case, I think only the width and height of the panel would be needed, OR the two expressed as a ratio and scaled later. WORKED EXAMPLE: Let's take for example an IBM System/360-40 console. It is comprised of a few individual panels but they are arranged in two larger rectangles, joined along one ege, but with an angle of about 163 degrees between them. The upper panel's flat measurements are 711mm wide and 477mm long. The lower panel is 71mm wide by 199mm high, as flat. Say I then found any sufficiently detailed photo of a /40 console, and wanted to map the surface of that to my known panel edge measurements. The photo is of course taken from any arbitrary angle. I will use this one, 1200x953 pixels, presenting a common three-quarter side view, taken fron the left: https://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/IBM_System_360_at_USDA.jpg/1200px-IBM_System_360_at_USDA.jpg The angled panels also show in the photo but that will be removed. Save the image locally. I tend to start at the pixel that is the top right corner. The image editor places the origin at the top left corner. Essentially the corners of the console rectangle in the photo - taking the upper panel only, for this example - need to be stretched to my known rectangle of TR=(711,0) to BR= (711,477) to BL=(0,477) to TL=(0,0). The rectangular polygon will automatically be closed back to the start. I'm using mm but you could use any measurement unit you like. Next, load the above photo of the console in any good-enough image editor. I use the free Paint.NET for this purpose and I absolutely love it. Move around the photo, zoom in etc. and place the mouse cursor exactly on the top right corner and take a note of the pixel coordinate shown in the lower right of the app. I make it to be (675,141) on that particular photo. Then do the same for the bottom right, bottom left, top left corner pixels. Remember this is the top panel only, the lower is done in the same fashion seperately. These are done in the same point-to-point sequence as the known measurements, and must be the same number of coordinates. It does not have to be a rectangle, you may have five, six or more coordinates for a say a vehicle or spaceship scale elevation. So directly off the photo: 675,141 TR 646,315 BR 442,336 BL 458,129 TL Now, assuming Imagemagick is installed, all we need to is tell it to stretch those coordinates to our known actual square coordinates by pairing them, pixel-to-known coordinate. On the command line, or in a text file enter and paste into the shell (I use git bash on Windows): convert 1200px-IBM_System_360_at_USDA.jpg -virtual-pixel black -distort Perspective "675,141 711,0 646,315 711,477 442,336 0,477 458,129 0,0" Model40_upper_panel_transformed_true_flat1.jpg Now the required de-perspective image will be in Model40_upper_panel_transformed_true_flat.jpg If you don't want to go through the above steps yourself you can see the result at http://web.aanet.com.au/~malikoff/ibm/Model40_upper_panel_transformed_true_flat1.jpg Then use the image editor rubber banding to select the required amount of this true flattened image, now using the original actual measurements as the pixel coordinates for cropping. eg. TR edge is pixel (711,0) etc. If the simple Perspective operation doesn't gove you a good result, try some other Imagemagick operations eg: convert 1200px-IBM_System_360_at_USDA.jpg -virtual-pixel black -interpolate Spline -distort BilinearForward "675,141 711,0 646,315 711,477 442,336 0,477 458,129 0,0" Model40_up
Re: Image de-warping tool, and Multics/GCOS panels
For quick (and automatic) perspective correction, sharpening and OCR, I use Microsoft's Office Lens. (Android, iOS, Windows 10 desktop) There are a couple of other apps that do the same sort of thing but I haven't tried them. On Sat, Oct 28, 2017 at 5:59 PM, Steve Malikoff via cctalk < cctalk@classiccmp.org> wrote: > Noeal asked: > > I'm having an issue with the images, though: taking a picture of a flat, > > rectangular panel with a camera usually produces distortion (even with > the > > lens set to the narrowest angle possible). > > > > Does anyone know of any freeware which will fix this? The image tool I > > normally use (ImagePals, sort of a poor man's Photoshop) does have a > 'warp' > > function, but it requires setting up a grid of points, and is a pain to > use: > > optimal would be something where you mark the 4 corners, and few > intermediate > > edge points, and the image is automagically fixed. > > > You could do it "by eye" in Photoshop and GIMP-type tools, but I believe a > far better and more adjustable > way is to use an operation in imagemagick called affine transformation. > With this you can tweak the > result programmatically to the nearest pixel-to-millimetre value to get > the best result. > > For instance I have done an analogous task in which I removed perspective > from black and white images > of a WWII vehicle onto a flat elevation, so that accurate markings and > camouflage patterns or precise > positions of fittings can be obtained, by only knowing the basic perimeter > edges. > > To do this, I firstly need an accurate measurement of the side of the > vehicle. Its exact length, height > will do. This is easily obtained from scale modelling information. In your > particular case, I think only > the width and height of the panel would be needed, OR the two expressed as > a ratio and scaled later. > > > WORKED EXAMPLE: > Let's take for example an IBM System/360-40 console. It is comprised of a > few individual panels but they > are arranged in two larger rectangles, joined along one ege, but with an > angle of about 163 degrees between > them. The upper panel's flat measurements are 711mm wide and 477mm long. > The lower panel is 71mm wide by 199mm high, as flat. > > Say I then found any sufficiently detailed photo of a /40 console, and > wanted to map the surface of that > to my known panel edge measurements. The photo is of course taken from any > arbitrary angle. > I will use this one, 1200x953 pixels, presenting a common three-quarter > side view, taken fron the left: > https://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/ > IBM_System_360_at_USDA.jpg/1200px-IBM_System_360_at_USDA.jpg > > The angled panels also show in the photo but that will be removed. Save > the image locally. > > I tend to start at the pixel that is the top right corner. The image > editor places the origin at the top left corner. > Essentially the corners of the console rectangle in the photo - taking the > upper panel only, for this example - > need to be stretched to my known rectangle of TR=(711,0) to BR= (711,477) > to BL=(0,477) to TL=(0,0). > The rectangular polygon will automatically be closed back to the start. > I'm using mm but you could use any > measurement unit you like. > > Next, load the above photo of the console in any good-enough image editor. > I use the free Paint.NET for this > purpose and I absolutely love it. Move around the photo, zoom in etc. and > place the mouse cursor exactly > on the top right corner and take a note of the pixel coordinate shown in > the lower right of the app. I make it > to be (675,141) on that particular photo. > > Then do the same for the bottom right, bottom left, top left corner > pixels. Remember this is the top panel only, > the lower is done in the same fashion seperately. These are done in the > same point-to-point sequence as the > known measurements, and must be the same number of coordinates. It does > not have to be a rectangle, you > may have five, six or more coordinates for a say a vehicle or spaceship > scale elevation. > So directly off the photo: > 675,141 TR > 646,315 BR > 442,336 BL > 458,129 TL > > Now, assuming Imagemagick is installed, all we need to is tell it to > stretch those coordinates to our > known actual square coordinates by pairing them, pixel-to-known > coordinate. On the command line, or in > a text file enter and paste into the shell (I use git bash on Windows): > > convert 1200px-IBM_System_360_at_USDA.jpg -virtual-pixel black > -distort Perspective "675,141 711,0 646,315 711,477 442,336 0,477 > 458,129 0,0" Model40_upper_panel_transformed_true_flat1.jpg > > Now the required de-perspective image will be in Model40_upper_panel_ > transformed_true_flat.jpg > > If you don't want to go through the above steps yourself you can see the > result at > http://web.aanet.com.au/~malikoff/ibm/Model40_upper_ > panel_transformed_true_flat1.jpg > > Then use the image editor rubbe