It is currently Tue Jul 23, 2024 2:17 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: CPhix - Automatic analysis and enhancement of images
PostPosted: Sat Sep 21, 2013 5:38 pm  (#1) 
Offline
GimpChat Member

Joined: May 09, 2012
Posts: 914
Bonjour,

Author :
Tibor Bamhor

Software Overview
https://code.google.com/p/cphix/

Examples
https://code.google.com/p/cphix/wiki/Examples

Binaries Windows 32/64bit + Sources for Linux
https://code.google.com/p/cphix/downloads/list


This software runs on the command line and performs batch processing on images.
The Cphix2 analyses brightness (average and overall contrast), saturation and sharpness and modifies them.
It allows you to add text.


For Windows users:
Unzip the archive "cphix-1.6_src+binaries_Win-32bit-Win-64bit.zip".
If you use a 64-bit Windows version go in the subdirectory \Win-64bit
If you use a 32-bit Windows version go in the subdirectory \Win-32bit
You can start the terminal by clicking "Start Terminal With Test CPHIX.bat" , help is displayed.
By clicking "test.bat" you change the 2 images on a vertical axis, the right side is the one that is changed.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Sun Sep 22, 2013 7:24 am  (#2) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14728
Location: USA
Amazing difference. :)

Image

Thanks for the heads up Sam. :bigthup

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Sun Sep 22, 2013 8:36 am  (#3) 
Offline
GimpChat Member

Joined: Dec 27, 2012
Posts: 393
Location: England
Maybe I'm doing something wrong here but when I run make in terminal I get this read out and then the compilation stops.

caz@Neptune ~/Desktop/cphix $ make
g++ -c -o easyexif/exif.o easyexif/exif.cpp
g++ cphix2.cpp -O2 -L/usr/X11R6/lib -lm -lpthread -lX11 -o cphix2.bin easyexif/exif.o
cphix2.cpp:22:18: fatal error: CImg.h: No such file or directory
compilation terminated.
make: *** [cphix2.bin] Error 1
caz@Neptune ~/Desktop/cphix $


Looks like there's a file missing. I downloaded the 1.6.tgz

_________________
Image

DeviantArt gallery


Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Sun Sep 22, 2013 9:07 am  (#4) 
Offline
GimpChat Member

Joined: May 09, 2012
Posts: 914
Bonjour,

@Caz

What operating system do you use ?
If you're on Linux you may be can try to install Cimg and/or GMIC packages then compile cphix.


Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Sun Sep 22, 2013 10:42 am  (#5) 
Offline
GimpChat Member

Joined: Dec 27, 2012
Posts: 393
Location: England
Thanks for the info, samj.
I'm running Linux Mint 15 and have GMIC installed.

_________________
Image

DeviantArt gallery


Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Sun Sep 22, 2013 12:47 pm  (#6) 
Offline
GimpChat Member

Joined: Sep 22, 2013
Posts: 27
also cimg-dev package might be needed - if your distribution offers it...

EDIT:

The file needed is /usr/include/CImg.h


Last edited by tibor95 on Sun Sep 22, 2013 4:00 pm, edited 1 time in total.

Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Sun Sep 22, 2013 1:02 pm  (#7) 
Offline
GimpChat Member

Joined: May 09, 2012
Posts: 914
@Caz

I have no problem to compile under Linux Mint 64-bit but I can not compile under Linux Mint 32-bit :(


Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Mon Sep 23, 2013 12:48 pm  (#8) 
Offline
GimpChat Member

Joined: Dec 27, 2012
Posts: 393
Location: England
Thanks guys. I installed the cimg-dev package and then ran make again. Not much appeared to happen, terminal took about 30 seconds to spit out one line of code, so maybe cphix did compile. The trouble is I have no idea how to make it run if it has compiled. Any ideas?

_________________
Image

DeviantArt gallery


Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Mon Sep 23, 2013 1:03 pm  (#9) 
Offline
GimpChat Member

Joined: Sep 22, 2013
Posts: 27
So you have cphix2.bin file in your compilation directory. For testing purposes put an image file into that directory and run
./cphix2.bin yourimage
(dot and slash must be there)
Alternatively run
./cphix2.bin /path/to/image
Final setup would be to put the bin file into path, possible option would be to /usr/bin (change to root first) and run it as
cphix2.bin bla bla bla
(no dot and slash now, you can run from anywhere)
So generally - treat it as any other binary on linux :) :)


Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Mon Sep 23, 2013 1:21 pm  (#10) 
Offline
GimpChat Member

Joined: May 09, 2012
Posts: 914
@Caz

With Linux Mint 32 bits it runs with ./ :roll:

./cphix2.bin --help


*****
binaries 32bit / 64bit are in the archive


Attachments:
cphix_binaries_Linux.zip [1.13 MiB]
Downloaded 107 times
Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Mon Sep 23, 2013 2:29 pm  (#11) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12535
Too tired to trouble-shoot samj, but, when I run the 64-bit test.bat, I get the following error message. :)


Attachments:
error_cphix.png
error_cphix.png [ 100.16 KiB | Viewed 1229 times ]

_________________
Lyle

Psalm 109:8

Image
Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Mon Sep 23, 2013 4:12 pm  (#12) 
Offline
GimpChat Member

Joined: Sep 22, 2013
Posts: 27
lylejk,

does the file final_bebe.jpg exists allready?
By default it would be overwritten without asking.
Make sure the directory is writeable for current user and disk is not full...

Also you can use "--skip" and cphix will test if the output file exists and will not try to create it.

it seems the crash occurs when cimg is called to perform save_jpeg function... It would be nicer if cimg returned error on such case instead of crashing whole application... :)


Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Mon Sep 23, 2013 4:26 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12535
Doesn't exist at all; never gets created. :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Mon Sep 23, 2013 4:32 pm  (#14) 
Offline
GimpChat Member

Joined: Sep 22, 2013
Posts: 27
is the directory writeable for you - can you create a file there? (I know probably this is not a problem, but you should make sure)

Also try "--png" switch

I just read that there is "official" way how to catch cimg exemptions so I could modify the cphix to survive such problems, print some error text and go on...

Can it be problem with cimg version? Not fully compatible with OS?


Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Mon Sep 23, 2013 5:09 pm  (#15) 
Offline
GimpChat Member

Joined: May 09, 2012
Posts: 914
@Lylejk
Extract the archive in C:\

Edit

Open the terminal (Windows) with "Start Terminal With Test CPHIX.bat".

You can test with "test.bat".

Do not use "MSys terminal".


Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Mon Sep 23, 2013 5:22 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Sep 24, 2010
Posts: 12535
tibor95 wrote:
is the directory writeable for you - can you create a file there? (I know probably this is not a problem, but you should make sure)

Also try "--png" switch

I just read that there is "official" way how to catch cimg exemptions so I could modify the cphix to survive such problems, print some error text and go on...

Can it be problem with cimg version? Not fully compatible with OS?


Yeah; put it in my program files directory and of course, it wasn't writeable. Followed samj's suggestion and now it works fine. Thanks :)

_________________
Lyle

Psalm 109:8

Image


Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Tue Sep 24, 2013 12:20 pm  (#17) 
Offline
GimpChat Member

Joined: Dec 27, 2012
Posts: 393
Location: England
Okay, it's working now but not working. I guess I'm just getting the idea wrong but can't for the life of me figure out how to get cphix to run it's magic on an image.
I place a Jpeg in the cphix directory as tibor95 directed to and then tried a few variations on the command to make it work

caz@Neptune ~/Desktop/cphix $ ./cphix2.bin redboat
! Unrecognized argument: redboat Use "-h" for info about switches.
! TERMINATING: No images to process...
caz@Neptune ~/Desktop/cphix $ ./cphix2.bin red boat.jpeg
! Unrecognized argument: red Use "-h" for info about switches.
! Unrecognized argument: boat.jpeg Use "-h" for info about switches.
! TERMINATING: No images to process...
caz@Neptune ~/Desktop/cphix $ ./cphix2.bin redboat.jpeg
! Unrecognized argument: redboat.jpeg Use "-h" for info about switches.
! TERMINATING: No images to process...

I also tried the other command that was suggested but no luck there either. And as for the line Use "-h" for info about switches I get a command not found message. I have got no idea how to make this work. Cheers for any more directions on this.

_________________
Image

DeviantArt gallery


Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Tue Sep 24, 2013 12:35 pm  (#18) 
Offline
GimpChat Member

Joined: May 09, 2012
Posts: 914
@Caz

I compile two versions for Linux Mint, maybe you can try...
viewtopic.php?f=22&t=8608#p111378


Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Tue Sep 24, 2013 1:40 pm  (#19) 
Offline
GimpChat Member

Joined: Sep 22, 2013
Posts: 27
@caz

you are doing probably some trivial mistakes
When you are in your working direcory, use 'ls' to list all files and make sure cphix2.bin and your jpgs are there
Keep in mind in linux case matters and blanks in filenames might be problem. (it seems filename "red boat.jpeg" was parsed as two files. Canonical syntax would be "red\ boat.jpeg", but cphix was not tested in this regard :) ). Also use auto-completion (tab key) to be sure you are entering existing file name.
Also syntax
./cphix2.bin *jpg *JPG *jpeg *JPEG
would catch all your jpg images in current directory :) Unless you are mixing cases in your suffixes.

EDIT:

"command not found message" - make sure you are in directory with cphix2.bin.

HINT: use 'ls' to see content of current directory and 'pwd' can show current directory

I know it looks like linux is teribly complicated :(


Top
 Post subject: Re: CPhix - Automatic analysis and enhancement of images
PostPosted: Wed Sep 25, 2013 1:08 pm  (#20) 
Offline
GimpChat Member

Joined: Dec 27, 2012
Posts: 393
Location: England
@ samj
Thanks for the compiled version. Just tested the 64-bit version and it's working fine. I was missing something rather obvious and that's why I couldn't get it to work. Please see below.

@ tibor95
I ran 'ls' to see what was going on as I still had no luck getting cphix to work and suddenly realised that the redboat file was a jpg and not a jpeg as I had been writing down in terminal. I used the right syntax, took the space out between red and boat, and everything worked. A force of habit thing as I tend to write jpeg when on-line.

Thanks for your patience samj and tibor. I like Linux and will never go back to windows but sometimes it totally baffles me. Now time to play with my latest Linux toy. :yes

_________________
Image

DeviantArt gallery


Top
Post new topic Reply to topic  [ 21 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Photo enhancement

6

No new posts Attachment(s) License Plate enhancement?

6

No new posts More RPG images

3

No new posts save images according to abc

1

No new posts Resizing Images

6



* Login  



Powered by phpBB3 © phpBB Group