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

How to apply random "random seed" value to multiple images

Community Beginner ,
Aug 21, 2013 Aug 21, 2013

So, I am in a weird situation, have been surfing the net for the solution for over a day now and can't really find the solution.

What is it?

Its a small school project which I have chosen and cant really find a way to do it.

What I want to achieve?

I have an image and I want to have like 50 variations of it.

What I did?

I loaded up an image, recorded an action which applies the filter called "Wave", the the wave dialog box I selectedMinimum and Maximum range for values.

Problem I am having:

I made 50 copies of the same image, and then I applied the action via batch processing to these 50 images. However, it applies the exact same settings/values which I recorded. It doesnt really use the range i.e maximum and minimum values I selected in the wave dialog box. It looks like when I closed hte wave dialog box, the action creates a new value called "Random seed" when recording and perhaps this random seed number tells photoshop what to choose from the min and max range supplied by the user.

So is there any way so that when I run the action, it will pick up a new random value from the supplied min and max range?

Thanks

Marolina

TOPICS
Actions and scripting
3.2K
Translate
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

correct answers 1 Correct answer

Guru , Aug 22, 2013 Aug 22, 2013

Save the script below in plain text with the .jsx extension. Replace the wave filter step in your action with a step that runs the script. The rest of the action can remain the same.

// seed range detemined by running the filter with the desired settings 10 times

// and getting the lower and upper range from the scriptlistener log

// the seed seems to depend on the other values. In another test the seed was

// a 8 digit number

var seed = Math.floor((192000-186000)*Math.random()) + 186001;

app.activeDo

...
Translate
Adobe
Guru ,
Aug 21, 2013 Aug 21, 2013

I think it is more likely that Random seed is used to determine where along the waveform to start. The waveform itself is defined by the other values in the dialog.

Unless you want to toggle the display for the wave step in the actions panel and click ok 50 times during the batch to generate a new Random seed you will need to replace the wave step in the action with a step that runs a script to apply the wave filter.

If you post the setting you used in the wave filter dialog( or a screenshot of the dialog with your settings ) I will try to create the script for you.

If you want to create the script yourself you can install the scriptlistener plug-in if it is not installed and run the wave filter several time to get an idea of the seed range. For example when I tried this using my setting the seed was a 8 digit number that started with 1763. You can use Math.random and Math.round to generate the other four digits.

Translate
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 ,
Aug 21, 2013 Aug 21, 2013

One could use the Filter from the DOM, too.

But what exactly is the intention?

Maybe randomizing the other settings would provide more significant effects.

Translate
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
Guru ,
Aug 22, 2013 Aug 22, 2013

One could use the Filter from the DOM, too.

I didn't even look to see if there was a Object Model method. But it is strange that the guide gives the range for the other values but not random seed.

Maybe randomizing the other settings would provide more significant effects.

Yes, I do think randomizing the other settings would change the effect of the filter more than changing the seed. But if you have an effect you like changing the seed would give you a different but similar effect.

Translate
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 ,
Aug 22, 2013 Aug 22, 2013

But it is strange that the guide gives the range for the other values but not random seed.

Indeed it is.

As the original poster said they had a deadline in another thread I guess it does not matter to them anymore either way.

Translate
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 Beginner ,
Aug 22, 2013 Aug 22, 2013

Hi guys, sorry for the late reply, I got the extension, now I have to submit it on Monday.

I am using the following range for Wave filter:

Number of generator: 1

Wavelenght: 93 to 198

Amplitude: 5 to 35

Scale 100% 100%

Type: Sine

Undefined area: Repeat edge

I downloaded the script listener plugin (I am using trial version of CS6), took a quick look over the pdf file, but it looks a lot, I was thinking of it as some type of maro recorder, but first I would need to learn the hmm syntax?

I am in Btech, and we were given the choice to make a project on any topic, and I selected the topic in which I want to prove that if we take a screenshot of the text, and run it through a s/w like photoshop, we can make 100s of different variations like twists etc (just like recaptcha does), to make it harder for the ocr programme to read it.

Basically, I want to show that OCR will become obsolute if we twist (apply other effects too) the text enough, but still it would be readable by the humans.

Translate
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
Guru ,
Aug 22, 2013 Aug 22, 2013

Save the script below in plain text with the .jsx extension. Replace the wave filter step in your action with a step that runs the script. The rest of the action can remain the same.

// seed range detemined by running the filter with the desired settings 10 times

// and getting the lower and upper range from the scriptlistener log

// the seed seems to depend on the other values. In another test the seed was

// a 8 digit number

var seed = Math.floor((192000-186000)*Math.random()) + 186001;

app.activeDocument.activeLayer.applyWave(1,93,198,5,35,100,100,WaveType.SINE,UndefinedAreas.REPEATEDGEPIXELS,seed);

Translate
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 Beginner ,
Aug 23, 2013 Aug 23, 2013

Thanks Michael! You really helped me a lot. I really appreciate it.

Thanks again!

Translate
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
New Here ,
Aug 28, 2021 Aug 28, 2021

Hi Michael,

I have a similar issue and you seem to have this down!  Wondering if you can please help me?? I just posted this describing the problem:

Need help with randomizing gradient fills

 

Appreciate you looking... 

Translate
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
LEGEND ,
Aug 29, 2021 Aug 29, 2021
LATEST
Translate
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