Skip to content Skip to sidebar Skip to footer

PHP Or Python For Image Processing?

I am writing an application for image processing. I am just wondering which programming language would be the best fit. Python or PHP. This process is system based not web based so

Solution 1:

Python has stuff like SciPy and PIL so probably Python.

Here is how people use it:
Peak detection in a 2D array
How can I improve my paw detection?


Solution 2:

One cannot suggest much without knowing the kind of image processing you have in mind.

  • If you just want to do some generic rotate/resize/etc then I guess there isn't much difference.

  • If you want to do something more complex, then study the libraries and decide which fits best for your particular task.

  • If you want to do something really custom, then C or similar language might be a better fit for the task.


Solution 3:

Possibly neither; it depends on what you want to do.

Both PHP and Python are scripting languages, and are therefore not suited for high-performance numerical routines (which most image processing requires). However, they both have a number of image-processing libraries available for them, the innards of which are probably written in C. These will be fast.

If these libraries do what you want, then fine. If you need to so something custom, then you're probably better off with C or C++ (or Pascal, or whatever) if speed of execution is of concern.


Solution 4:

Python is more clean and readable. For image processing there is the imageMagic library available for Python and PHP too.

If you want to do some other complex image processing, which cannot by done using a library and you still want to do it in Python or PHP, then Python is defenitely the answer as Python can be extended with C -- But, wait, you didn't mention programming in C, well, there is Cython! It would allow you to write Python modules which are afterwards compiled to C


Solution 5:

It really depends on what you want to do with the images. You probably should just use a batch or similar script to run a command that does the processing your looking for.

Between the two languages, I would go with python. The command line interface for php is only a recent addition, while python was designed primarily as a scripting language, not for serving pages. For a console application, python is a better fit.


Post a Comment for "PHP Or Python For Image Processing?"