BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Text in Image
Goto page 1, 2  Next
 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Wayne & Carr
Guest





PostPosted: Mon Mar 21, 2005 5:27 am    Post subject: Text in Image Reply with quote



Hello All;

I am wondering if anyone knows of a possible way to Edit Text in an Image?

Lets say that you have an Image that has {something written here}
On the bottom of the image. Is their a way in Delphi to Render through the
Image.
To [Remove] the chosen Text, and replace it with the existing surrounding
Background
Color?

Thanks all
Wayne


Back to top
Mike Shkolnik
Guest





PostPosted: Mon Mar 21, 2005 8:50 am    Post subject: Re: Text in Image Reply with quote



It depends from Image format
If this is the metafile and text stored as text record (not part of stored
bitmap, for example) then you may do what you want.
But generally the text that you see, is a part of image (just set of pixels)
and you cam't do it.

--
With best regards, Mike Shkolnik
EMail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
http://www.scalabium.com

"Wayne & Carr" <spam (AT) spam (DOT) net> wrote

Quote:
Hello All;

I am wondering if anyone knows of a possible way to Edit Text in an
Image?

Lets say that you have an Image that has {something written here}
On the bottom of the image. Is their a way in Delphi to Render through the
Image.
To [Remove] the chosen Text, and replace it with the existing surrounding
Background
Color?

Thanks all
Wayne





Back to top
Andy Vines
Guest





PostPosted: Mon Mar 21, 2005 12:18 pm    Post subject: Re: Text in Image Reply with quote




"Mike Shkolnik" <mshkolnik2002 (AT) ukr (DOT) net> wrote

Quote:
It depends from Image format
If this is the metafile and text stored as text record (not part of stored
bitmap, for example) then you may do what you want.
But generally the text that you see, is a part of image (just set of
pixels)
and you cam't do it.

Wouldn't some sort of OCR package/component be able to do this?




Back to top
Mike Shkolnik
Guest





PostPosted: Mon Mar 21, 2005 12:34 pm    Post subject: Re: Text in Image Reply with quote

Quote:
Wouldn't some sort of OCR package/component be able to do this?
Using OCR you may "detect" the text strings on picture. But you can't

"restore" the original image under "text" pixels

--
With best regards, Mike Shkolnik
EMail: [email]mshkolnik (AT) scalabium (DOT) com[/email]
http://www.scalabium.com



Back to top
Wayne & Carr
Guest





PostPosted: Mon Mar 21, 2005 1:36 pm    Post subject: Re: Text in Image Reply with quote


"Mike Shkolnik"
Quote:
Wouldn't some sort of OCR package/component be able to do this?
Using OCR you may "detect" the text strings on picture. But you can't
"restore" the original image under "text" pixels

OK, this I know that you will not be able to do.
But how about rendering out the Pixels that surround each letter?

HELLO WORLD

Each line will be replaced with the pixels that are set around it.
So that when the Rendering of the image is complete, It will have taken
On it's surronding pixles??

Wayne



Back to top
Brian C Famous
Guest





PostPosted: Mon Mar 21, 2005 2:16 pm    Post subject: Re: Text in Image Reply with quote

assuming you used OCR to detect the text and calculate it's exact
position...
Would you be taking an 'average' of the colors around the pixels (ie. top,
left, bottom, right) and then changing what was the text to that color?
i would assume you would have to detect the exact locations of all pixel
text, then do some sort of thresholding to establish if the pixel say to the
left of the text was actually part of the text (for fonts that were smoothed
and don't have as exact of a pixel edge) since it might not have exactly the
same color value. obviously, if it was deemed part of the text, you
wouldn't want to average it's color into the new color value. but would you
then want to move an additional pixel over in that direction to accomodate
for it?
i guess programmatically you would be working either left-to-right, or
top-to-bottom. so that after you create a new color, then that color should
not be calculated into the average color of the new pixel, otherwise it
would be distorting what seems to be the true average.

this seems like it could get awful messy, producing some very odd things,
especially in instances where the text was only slightly different than the
pixels around it - it could start creating a sort of bleed effect in your
image. i'm just thinking about black text - it could very easily get
confused with pixels around it that were actually shadows in the image. or
what not.

seems like an awful lot of programming work just to remove someones
watermark or copyright...

kind regards,
brian



Quote:
HELLO WORLD

Each line will be replaced with the pixels that are set around it.
So that when the Rendering of the image is complete, It will have taken
On it's surronding pixles??

Wayne





Back to top
Wayne
Guest





PostPosted: Tue Mar 22, 2005 2:44 am    Post subject: Re: Text in Image Reply with quote

Hello ["Brian C Famous"]

Thanks for your input on this posting. The more the better really.

As for a lot of work to get rid of someone's copyright?
Na, that is not it.
There are images out their that people have added "Their Name, a Date"
And so forth to the image that they just put there so that people would
now that it came from there site, Even though the images did not come from
Them, and were not made by them.

Copyrighted images that are "TRUE" Copyrights, are hosted (Most of the time)
On a photographers site. And in them cases, a simple contact will allow you
to host
Them on your site.

See this is what I am up against.
I have been asked by many, many people to make a Dedication "Documentary
Movie"
About a certain 'Star' whom died in the early 90's.
Though I do not have all the images personally myself, nor do they.
I have to search the Internet for them.
The images that I have found have mess on them like: [ Scanned By: Ace]
It is this mess that I would like to remove, without adding in any
additional text.
Or cropping too much of the image off.

So their is a very good reason for wanting to check in on the development of
something like this.

Take Care and Thanks.

Wayne


Back to top
Brian C Famous
Guest





PostPosted: Tue Mar 22, 2005 12:20 pm    Post subject: Re: Text in Image Reply with quote

Sorry Wayne, i was really just being sarcastic - guess it may have not come
off that way. just thinking that's what most people would want it for.

but i really think you're fighting a tough battle to do a good job getting
rid of the text and having it look decent.
just going through PhotoShop, i was manually toying with a couple images
with text across them. i was trying to basically erase the text like you
are suggesting, by replacing it with surrounding colors. on text that is no
more than 3 pixels wide, you have a decent shot of doing it (if it has a
hard edge - which most don't seem to). Once you get to text that is wider,
it gets real hard, and it looks like a shadow of the text, or a watermark.
if you don't know what the images is supposed to be underneath, it can be
difficult.
for example, say you take an image, that is a merely a square, with a
dividing line going from top left to bottom right. the top right section is
black, the bottom left section is red. Now put yellow text right across the
middle, and make the text bold.
when you go to replace the text that is directly in front of the dividing
line, it gets difficult to accurately estimate where that line is, leaving
you with what i'd call "shakiness" on the hard edge. it's almost impossible
to account for an angle...
granted, in real life there are very rarely hard edges like that, but i
think that even makes it harder.

have you taken a start at trying to code all of this?





"Wayne" <spam (AT) spam (DOT) net> wrote

Quote:
Hello ["Brian C Famous"]

Thanks for your input on this posting. The more the better really.

As for a lot of work to get rid of someone's copyright?
Na, that is not it.
There are images out their that people have added "Their Name, a Date"
And so forth to the image that they just put there so that people would
now that it came from there site, Even though the images did not come from
Them, and were not made by them.

Copyrighted images that are "TRUE" Copyrights, are hosted (Most of the
time)
On a photographers site. And in them cases, a simple contact will allow
you
to host
Them on your site.

See this is what I am up against.
I have been asked by many, many people to make a Dedication "Documentary
Movie"
About a certain 'Star' whom died in the early 90's.
Though I do not have all the images personally myself, nor do they.
I have to search the Internet for them.
The images that I have found have mess on them like: [ Scanned By: Ace]
It is this mess that I would like to remove, without adding in any
additional text.
Or cropping too much of the image off.

So their is a very good reason for wanting to check in on the development
of
something like this.

Take Care and Thanks.

Wayne





Back to top
Wayne
Guest





PostPosted: Tue Mar 22, 2005 2:02 pm    Post subject: Re: Text in Image Reply with quote

Hello Brian;

No problem on the comments.

No, it is an idea, a thought.
Nothing concrete at the moment.

I have never really messed around with the Graphics
Parts in Delphi, except to display an image in the project.
Other then that, I do more "WebBrowser" & some "Text Editor" projects.

But I have been searching through Google, to see if anyone might have at
some time played around with this
Idea. And so far, no luck.

Like I mentioned above, This is an "Idea" a "Thought".
If it can be done, then hopefully someone will figure it out.
If it cannot be done (Right Now) then it will be figured
Out eventually.

Think about it.
Developers first started out by finding ways to make there computers
Do what they want them to do. They also found ways of making it change
Back to its previous state.
So with that thought, maybe someone in some language has done something
Similuar to this.
May not be a complete success, but it could be a starting point to what can
be done.
And with the way that the computer programs are doing these days.
It is just a walk in the park for what we will be able to do tomorrow.

We will all see.
Looking towards the future is all we have going for us.
The project that we start on today, could be the next big thing.

Take Care All;
Wayne


Back to top
somebody
Guest





PostPosted: Tue Mar 22, 2005 5:06 pm    Post subject: Re: Text in Image Reply with quote

"Wayne" <spam (AT) spam (DOT) net> wrote

Quote:
Copyrighted images that are "TRUE" Copyrights, are hosted (Most of the
time)
On a photographers site. And in them cases, a simple contact will allow
you
to host
Them on your site.

1. It cannot be done easily and/or satisfactorily.
2. Regardless of whether you *think* the copyright mark is "false" or
"true", it's inadvisable to assign yourself as the judge of that.



Back to top
Wayne
Guest





PostPosted: Tue Mar 22, 2005 6:00 pm    Post subject: Re: Text in Image Reply with quote


Hello ["somebody"] ??
Quote:

1. It cannot be done easily and/or satisfactorily.
2. Regardless of whether you *think* the copyright mark is "false" or
"true", it's inadvisable to assign yourself as the judge of that.


Too begin with. Read what I wrote, and you will see that I stated:
[Quote Wayne]
Copyrighted images that are "TRUE" Copyrights, are hosted (Most of the time)
On a photographers site. And in them cases, a simple contact will allow you
to host them on your site.
[End Quote Wayne]

I did not state nothing about the removal of a Copyright.
What in the world are you talking about?

Somebody??
Not that many people are going to take you to seriously with a screen name
like that



Back to top
Nicholas Sherlock
Guest





PostPosted: Tue Mar 22, 2005 7:33 pm    Post subject: Re: Text in Image Reply with quote

Wayne wrote:
Quote:
Too begin with. Read what I wrote, and you will see that I stated:
[Quote Wayne]
Copyrighted images that are "TRUE" Copyrights, are hosted (Most of the time)
On a photographers site. And in them cases, a simple contact will allow you
to host them on your site.
[End Quote Wayne]

I did not state nothing about the removal of a Copyright.
What in the world are you talking about?

Copyright is automatic. You don't have to be hosted on a professional
website to have copyright over your works.

Cheers,
Nicholas Sherlock

Back to top
Ronaldo Souza
Guest





PostPosted: Wed Mar 23, 2005 3:32 am    Post subject: Re: Text in Image Reply with quote

Wayne & Carr wrote:
Quote:

OK, this I know that you will not be able to do.
But how about rendering out the Pixels that surround each letter?

Take a look at a sample code I posted in the b.p.attachments group

(378KB zip file). Don't know if its what you're thinking, but could be a
starting point.

Warning: it was *not* really tested and it has a recursive procedure, so
be careful... :-)

Good luck,
Ronaldo

PS: I'm *not* doubting your intentions but, the copyright issue
*fundamental* so, if this code is of any value to you or anyone else, it
*must* be used within legal/ethical bounds.


Back to top
Ronaldo Souza
Guest





PostPosted: Wed Mar 23, 2005 4:12 am    Post subject: Re: Text in Image Reply with quote

Wayne & Carr wrote:
Quote:

OK, this I know that you will not be able to do.
But how about rendering out the Pixels that surround each letter?

Take a look at a sample code I posted in the b.p.attachments group

(377KB zip file). Don't know if its what you're thinking, but could be a
starting point.

Warning: it was *not* really tested so be careful... :-)

Good luck,
Ronaldo

PS: I'm *not* doubting your intentions but, the copyright issue is
*fundamental* so, if this code is of any value to you or anyone else, it
*must* be used within legal/ethical bounds.


Back to top
Wayne & Carr
Guest





PostPosted: Thu Mar 24, 2005 6:00 am    Post subject: Re: Text in Image Reply with quote

Hello ["Ronaldo Souza"];

Similuar to what I am needing,
But I need the Text Removed from the Image(s)
And then the Image shown without any text.
To where your demostration has the
Text stripped from the Image(s), and displaying only the [Text]
As an output, not the actual image(s) themselves.

Thanks
Wayne


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.