• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to remove everything except numbers from chart images?

Explorer ,
Feb 27, 2023 Feb 27, 2023

Copy link to clipboard

Copied

 

I receive about 500 to 1000 photos of charts or graphs on a daily basis that i have to remove all the components of the photos except their numerical values. 

 

This is an example of my photos: 

001.jpg 

I select graph bars using Magic Wand Tools in Photoshop

002.jpg 

Then move selected area to between logos and the numerical values

003.jpg 

And finally, by removing the various components of the images, only numerical values remain

004.jpg 

I have to do these steps with Photoshop action feature because the number of my daily photos is very high. 
I can do these steps with action feature automatically if the distance between the edge of the graph bars and the first digit of the numerical values is the same in all images. but the main problem here is that the space between the numerical values and the graph bars in the images received daily is not the same

 
For example, this is another photo where the distance between the numerical values and the bars of the graph is very close: 

005.jpg 

If I apply the steps I went through for the previous image using Photoshop action feature on this image, surely some of the numerical values will be removed in this image. 

 

How can I delete all the components of my daily images except the numerical values through the Photoshop action feature? 

Can I move selected area exactly to before the numeric values using the Photoshop script

 

Note: 

  1. I can't use Photoshop Color Range tool for selecting numeric values because numeric values have same color as the rest of the image contents. 
  2. My daily images have a single layer and are not smart objects
  3. number of images received daily is very high and I cannot do it manually. I must do it with Photoshop action feature or another automatic solution. 
  4. I can't use OCR tool because some of the images contain some logos that contain letters or numbers. If the logo numbers are extracted and combined with numerical values, it is not possible to find the extracted logo numbers. 
  5. The space between the graph bar and numerical values in each image is specific and this distance is different between different images. 
  6. The space between the graph bar and numerical values in a photo is the same. 
  7. All my images resolution is same 
  8. It is not a problem if resolution of the photo are changed. 
  9. I know that the explanation I provided is complicated, but I could not express my problem more simply than this. 

 

I have been facing this difficult problem for about three months and I hope I can find a solution here 

 

Sorry if there are any spelling errors in the text because my English is very poor. I wrote this text with the help of Google Translate.

TOPICS
Actions and scripting , Windows

Views

16.4K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Explorer ,
Mar 07, 2023 Mar 07, 2023

Copy link to clipboard

Copied

quote

mesal4.jpg


By @abolfazl28627254vbil

Of course, the graphs that do not have logos are not so important because numerical values remain easily by erasing the graph bars.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 08, 2023 Mar 08, 2023

Copy link to clipboard

Copied

The only thing the script should be able to do in all these images is to keep the numerical values with their units

Of course the Script does not work that way for these images. 

 

One interesting problem is the combination »449« in two of these new images – they are so much more »soft« than the previous images that the two »4«-s link up and thus trip up the Script in one case. 

Screenshot 2023-03-08 at 13.54.55.png

 

Other than that the different font (in which numbers have varying ascenders and descenders), the units of measurement, the missing bar, the missing logos do indeed prevent successful processing with this script. 

 

The repeated moving of the goalposts makes pursuing this further seem unpromising. 

Maybe you should look for solutions elsewhere, machine-learning-specialists might be able to get more meaningful results with more »ease«. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 10, 2023 Mar 10, 2023

Copy link to clipboard

Copied

quote

The only thing the script should be able to do in all these images is to keep the numerical values with their units

Of course the Script does not work that way for these images. 

By @c.pfaffenbichler

Did you see my last post in this thread? Or have I mentioned you wrongly? Do you have any ideas about my last post?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 08, 2023 Mar 08, 2023

Copy link to clipboard

Copied

quote

removeEverythingExceptNumbers_mov01.gifScreenshot 2023-03-07 at 16.11.11.png


By @c.pfaffenbichler

As you can see from the performance of your script, it does not make any changes to the graph bars and the script directly applies the changes to the numerical values and logos.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
May 22, 2023 May 22, 2023

Copy link to clipboard

Copied

LATEST
quote

It seems a Script could handle the sample images (at least those that I downloaded, I might have missed some), but I guess it would  just be a question of time until the next image with different parameters is presented … 

 

By @c.pfaffenbichler

Hi, i'm back after few month. I lost password of my adobe community account (Author of this post = abolfazl28627254vbil) and my account linked to a temp mail that i lost that email and i can't recover it password. Yesterday, a new solution came to my mind. I share my idea here with you and if it possible complete my idea for remove everything except numbers from chart images. can write a script for this problem using flip horizontal? in following video i show my idea: 
 
Video_2023-05-22_210848.gif

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 08, 2023 Mar 08, 2023

Copy link to clipboard

Copied

The only relationship I found in the received daily images is the ratio between the diameter of the first bar and the distance between the first bar and the first numerical value in each image. 

 

Image (1) with 3 bars: (first bar diameter = 580pt) - (first distance between = 820pt) => 820 ÷ 580 = 1.41 

Image (2) with 5 bars: (first bar diameter = 350pt) - (first distance between = 500pt) => 500 ÷ 350 = 1.42 

Image (3) with 6 bars: (first bar diameter = 290pt) - (first distance between = 415pt) => 415 ÷ 290 = 1.43 

Image (4) with 8 bars: (first bar diameter = 220pt) - (first distance between = 315pt) => 315 ÷ 220 = 1.43 

 

Maybe I should get the relation between the diameter of the first bar and the distance between the first numerical value and the first bar by calculating from some random images of daily images. 

then set this relation to specific photoshop script and by multiplying this relation by the diameter of the first bar of each image, the script finds the amount of offset or size to move the selection to the right.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 08, 2023 Mar 08, 2023

Copy link to clipboard

Copied

quote

The only relationship I found in the received daily images is the ratio between the diameter of the first bar and the distance between the first bar and the first numerical value in each image. 

 

Image (1) with 3 bars: (first bar diameter = 580pt) - (first distance between = 820pt) => 820 ÷ 580 = 1.41 

Image (2) with 5 bars: (first bar diameter = 350pt) - (first distance between = 500pt) => 500 ÷ 350 = 1.42 

Image (3) with 6 bars: (first bar diameter = 290pt) - (first distance between = 415pt) => 415 ÷ 290 = 1.43 

Image (4) with 8 bars: (first bar diameter = 220pt) - (first distance between = 315pt) => 315 ÷ 220 = 1.43 

 

Maybe I should get the relation between the diameter of the first bar and the distance between the first numerical value and the first bar by calculating from some random images of daily images. 

then set this relation to specific photoshop script and by multiplying this relation by the diameter of the first bar of each image, the script finds the amount of offset or size to move the selection to the right.


By @abolfazl28627254vbil

I found a photoshop script called "ActionFileToJavascript" that can convert action file to photoshop script and now i can convert some of my editing actions to javascript 😊

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 09, 2023 Mar 09, 2023

Copy link to clipboard

Copied

quote
By c.pfaffenbichler

Do you have an idea for this?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines