Return-Path: owner-tiff@olympiakos.com
Return-Path: <owner-tiff@olympiakos.com>
Received: from localhost (localhost [127.0.0.1])
	by at1895.spb.edu (8.12.0.Beta7/8.12.0.Beta7) with ESMTP id f4NHF5KR022556
	for <dron@localhost>; Wed, 23 May 2001 21:15:05 +0400
Received: from eudoramail.com [209.185.123.45]
	by localhost with POP3 (fetchmail-5.8.1)
	for dron@localhost (single-drop); Wed, 23 May 2001 21:15:05 +0400 (MSD)
Received: from gate7.olympiakos.com ([207.176.88.85]) by shared1-mail.whowhere.com; Wed May 23 06:04:37 2001
Received: from localhost (daemon@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) with SMTP id IAA24350;
	Wed, 23 May 2001 08:57:02 -0400
Received: by gate7.olympiakos.com (bulk_mailer v1.9); Wed, 23 May 2001 08:55:26 -0400
Received: (from majordom@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) id IAA24264
	for tiff-outgoing; Wed, 23 May 2001 08:55:25 -0400
X-Authentication-Warning: gate7.olympiakos.com: majordom set sender to owner-tiff@olympiakos.com using -f
Received: from RDUMAIL.mobiusg.com (mail.mobiusg.com [209.137.82.13])
	by gate7.olympiakos.com (8.9.3/8.9.3) with SMTP id IAA24261
	for <tiff@olympiakos.com>; Wed, 23 May 2001 08:55:23 -0400
Received: by RDUMAIL.mobiusg.com with Internet Mail Service (5.5.2653.19)
	id <FM7ML8Y0>; Wed, 23 May 2001 08:54:02 -0400
Message-ID: <FCDAB278C6F74643A0C1243407D6773B06A263@RDUMAIL.mobiusg.com>
From: Chris Losinger <closinger@checkfreeinvsvcs.com>
To: tiff@olympiakos.com
Subject: RE: Removing dark areas
Date: Wed, 23 May 2001 08:53:57 -0400
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2653.19)
Content-Type: text/plain;
	charset="iso-8859-1"
Sender: owner-tiff@olympiakos.com
Status: RO
Content-Length: 1561
Lines: 54


	1. pick a threshold value (0..255)
	2. run along each edge of the image
	2a. if you find a line that has all pixels below the threshold, that
line is considered part of the "border"
	2b. as soon as you find a line that has pixels above the threshold,
you consider that line to be part of the image. 
	3. crop the border parts

	you can test for indiviual pixels, groups of pixels, etc..
	you could despeckle the image first, to get rid of dust, etc..

	-c

> The problem, more precisely stated, is this:
> 
> Detect a dark border around the images, and then remove the 
> dark region,
> retaining the rest of the image. The resolution of the image 
> remains the
> same, but the size decreases because of this removal of border.
> 
> 
> ------------------------------
> 
> On Fri, 18 May 2001, Jim Schueckler wrote:
> 
> Dear Siddarth,
> I suggest that you post your message again, but you need to be
> more specific about what needs to be done.
> 
>  From what you wrote, I can see several *very different* 
> interpretations:
> 1) Detect a dark border around each image and then crop the border
> off, making the final image smaller, having fewer lines and 
> fewer pixels
> per line.
> 
> 2) Detect the dark areas of an image and then brighten them up,
> but leave the image with the same dimensions.
> 
> 3) Something else?
> 
> regards,
> Jim
> 
> 
> 
> 
> >I need to modify an images - remove dark regions around 
> images. This has
> >to be done for almost 15000 images. Can someone suggest the 
> procedure? I
> >can send a sample image if required..

