Processing for print

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Processing for print

Post by snibgo »

Thanks for the link. Their definition of peak ...
A local peak is a data sample that is either larger than its two neighboring samples or is equal to Inf. Non-Inf signal endpoints are excluded. If a peak is flat, the function returns only the point with the lowest index.
... is very simple. Far too simple for my purposes, as a typical photograph with a noisy histogram would have a very large number of peaks. Various alternative definitions might be used, such as smoothing the histogram (or reducing the number of buckets) before finding peaks. I use a sliding window across the histogram, with default width 10% of histogram. Then a series of rules (between three and seven) determine where the peaks lie.
snibgo's IM pages: im.snibgo.com
afre
Posts: 57
Joined: 2014-01-22T15:02:53-07:00
Authentication code: 6789

Re: Processing for print

Post by afre »

I linked to the Matlab help pages for the discussion on the function's arguments, "Prominence", and links to "Peak Analysis" and "Find Peaks in Data". Anyway, it was just to give you and fmw42 context to where my thoughts lie. I look forward to your implementation :).
ImageMagick 7.0.7-25 Q16 x64 2018-03-04 · Cipher DPC HDRI Modules OpenMP · Windows 7
afre
Posts: 57
Joined: 2014-01-22T15:02:53-07:00
Authentication code: 6789

Re: Processing for print

Post by afre »

The cygwin-built IM creates files with permissions different from the Windows default (a looser one). Any idea how I can prevent this?

Code: Select all

> icacls mean.png
pc\User:(R,W,D,WDAC,WO)
pc\None:(R)
Everyone:(R)
NT AUTHORITY\SYSTEM:(F)
BUILTIN\Administrators:(F)

> ls -l mean.png
-rw-rwxr--+ 1 User None 11135555 Mar  4 11:35 mean.png
ImageMagick 7.0.7-25 Q16 x64 2018-03-04 · Cipher DPC HDRI Modules OpenMP · Windows 7
afre
Posts: 57
Joined: 2014-01-22T15:02:53-07:00
Authentication code: 6789

Re: Processing for print

Post by afre »

Re: CYGWIN Puzzle → What I know so far and might be why I've been having trouble with snibgo's scripts:
  1. Re: Permissions problem. I found a simple workaround: due to inheritance, the permissions are correctly administered when I write to a different directory than the current one.
  2. On my system, CYGWIN-built binaries follow Bash conventions; they don't understand backslashes (e.g. Windows-styled paths) or windows environment variables (%sssOPTION%).
BTW snibgo, I noticed that your Histogram peaks page is up now :D. Scripts like histoPeaks.bat use binaries that aren't readily available (cPrefix). Hence, I can't try out some of your srcripts.
ImageMagick 7.0.7-25 Q16 x64 2018-03-04 · Cipher DPC HDRI Modules OpenMP · Windows 7
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Processing for print

Post by snibgo »

2. Yes, paths are a pain in the neck. But environment variables such as %sssOPTION% are translated by the command processor, such as Windows CMD. The translation is passed to the binary program, so it doesn't matter whether the binary is Windows or Cygwin.

Yes, scripts use binaries that I don't publish. The cygwin toolset probably contain tools that are better than those binaries.
snibgo's IM pages: im.snibgo.com
afre
Posts: 57
Joined: 2014-01-22T15:02:53-07:00
Authentication code: 6789

Re: Processing for print

Post by afre »

2. Unfortunately, this won't work on my system:

Code: Select all

%imdev%convert -quiet %i %sssOPTION% %~ni_.TIF
Currently, I have to modify sigSetSd.bat to write to a file that I can access later using

Code: Select all

FOR /f "tokens=...
It doesn't make much sense to me but it happens with the slashes too when I use %im% or %imdev%, which confuses the heck out of me.
ImageMagick 7.0.7-25 Q16 x64 2018-03-04 · Cipher DPC HDRI Modules OpenMP · Windows 7
Post Reply