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 f4U81nrr015269
	for <dron@localhost>; Wed, 30 May 2001 12:06:25 +0400
Received: from eudoramail.com [209.185.123.45]
	by localhost with POP3 (fetchmail-5.8.1)
	for dron@localhost (single-drop); Wed, 30 May 2001 12:06:25 +0400 (MSD)
Received: from gate7.olympiakos.com ([207.176.88.85]) by shared1-mail.whowhere.com; Tue May 29 17:42:05 2001
Received: from localhost (daemon@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) with SMTP id UAA09872;
	Tue, 29 May 2001 20:24:34 -0400
Received: by gate7.olympiakos.com (bulk_mailer v1.9); Tue, 29 May 2001 20:18:35 -0400
Received: (from majordom@localhost)
	by gate7.olympiakos.com (8.9.3/8.9.3) id UAA09635
	for tiff-outgoing; Tue, 29 May 2001 20:18:34 -0400
X-Authentication-Warning: gate7.olympiakos.com: majordom set sender to owner-tiff@olympiakos.com using -f
Received: from fox.tamu.edu (root@unix.tamu.edu [128.194.103.25])
	by gate7.olympiakos.com (8.9.3/8.9.3) with ESMTP id UAA09631
	for <tiff@olympiakos.com>; Tue, 29 May 2001 20:18:32 -0400
Received: from localhost (ssk9770@localhost)
	by fox.tamu.edu (8.9.3/8.9.3) with SMTP id QAA13743;
	Tue, 29 May 2001 16:33:49 -0500 (CDT)
Date: Tue, 29 May 2001 16:33:49 -0500 (CDT)
From: Siddarth S Kalasapur <ssk9770@unix.tamu.edu>
To: Chris Losinger <closinger@checkfreeinvsvcs.com>
cc: tiff@olympiakos.com
Subject: RE: Removing dark areas
In-Reply-To: <FCDAB278C6F74643A0C1243407D6773B06A263@RDUMAIL.mobiusg.com>
Message-ID: <Pine.SOL.3.96.1010529163328.13661A-100000@fox.tamu.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Sender: owner-tiff@olympiakos.com
Status: RO
Content-Length: 2324
Lines: 77

Howdy Folks!

Sorry for the frequent mails regarding the same problem. I have one
question. I read each line of the image into a variable 'buf', of type
t_buf. I now have to access each pixel of this line, whcih is in the
variable buf. If I find a 0 followed by a 1, or vice versa, I have to
stop. Can someone suggest a mechanism for the same?? My idea is that once
I find a 0 after a series of 1s, I detect an edge. Since I am dealing with
bilevel images only, this is a good enough solution for me.

Can someone who has already encountered such a situation before be kind
enough to help me with this???

Thanks a ton, and regards,
Siddarth                                                                       






On Wed, 23 May 2001, Chris Losinger wrote:


	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..

