Click here to Skip to main content
15,893,622 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi friends,

In My project i need to search for specific text in a folder that conatains image with extension jpg and png.
note: I need only c# code for this
please help i need it very badly!!!
Thanks in advance.
Posted
Comments
phil.o 3-Dec-13 6:53am    
What have you tried?
Thomas ktg 3-Dec-13 6:56am    
Give it a try and then come back. Surely you can achieve something.

Exactly what you need to do is dependant on where the text is: if it is in teh file name, then that's pretty trivial.
If it's in the image itself, then that's really quite complex, and means using some OCR software on the image first to identify any text and then search that. There are a coupel of open-source OCVR libraries, some of which have .NET wrappers - Google "open OCR C#[^] is the best place for you to start looking, but dontt expect this to be a five minute job, or to get code ready to do exactly what you want (and probably, don't expect the results to be quick to run either!)
 
Share this answer
 
see these Links Try any one to implement if still you are facing any problem post it Read Text from Image in C#.net
C# Imaging - OCR Recognition in C#.NET
 
Share this answer
 
Hi Try this

C#
string path = @"D:\Images";
           DirectoryInfo di = new DirectoryInfo(path);
           FileInfo[] fi = new string[] { "*.jpg", "*.png" }.SelectMany(i => di.GetFiles(i, SearchOption.AllDirectories)).Distinct().ToArray();
           string[] filenames = fi.Select(k => k.Name).ToArray();
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900