Looking for good graphics language.

In summary: It seems like it would be a lot of work.It would definitely be a lot of work to do this type of task in a new language. If you're comfortable with some of the more common programming languages, it might not be as difficult as you think. But if you're looking to learn a new language, it would definitely be a good idea to choose one that's designed specifically for this type of task.
  • #1
DSR
11
0
Hello.

I want to find a computer language for doing real-time interactive graphics. I want to be able to operate on each point of an image in real-time. For example I thought it would be interesting to be able to write a program that will perform a Fourier Transform on an image, do some operation on it, and then transform it back, sort of like an optical filter. I’m not asking anyone to write me code that does this. It’s just an example of something I’m thinking of doing. What would be the best language for this task? I know ‘C’, Pascal, and BASIC pretty well. And I know a little Visual Basic and C++. If possible it would be good if I could find something that's at least reasonably priced.

You might be able to tell that it’s been a little while since I’ve done some coding since I’m not up on the latest languages, like C#, Java, Perl, or J. And what is the difference between C++ and C#? And has anyone heard of a language called 'D'? I suppose it’s supposed to be the latest, greatest successor to C++, and C#.

Thanks.
 
Technology news on Phys.org
  • #2
OpenCV is a C library for doing image processing tasks, it's a very good way to learn about the various operations and it comes with framework code to load images and display them and the results. And it's free.
 
  • #3
DSR said:
Hello.

I want to find a computer language for doing real-time interactive graphics. I want to be able to operate on each point of an image in real-time. For example I thought it would be interesting to be able to write a program that will perform a Fourier Transform on an image, do some operation on it, and then transform it back, sort of like an optical filter. I’m not asking anyone to write me code that does this. It’s just an example of something I’m thinking of doing. What would be the best language for this task? I know ‘C’, Pascal, and BASIC pretty well. And I know a little Visual Basic and C++. If possible it would be good if I could find something that's at least reasonably priced.

For such purposes I would choose C. The main reason for this is because there are tons of open source programs (written in C/C++) that already do similar functions. But the more important thing is that these programs use existing libraries that make implementing Fourier transforms and other tools for manipulating images in the frequency domain a little easier. The good thing is that you probably won't have to do much of the low level detail of the transforms yourself as someone else has already provided a library for it.

You can search Souceforge for such software and libs. And example of such an image manipulation program is GFourier (which I've never tried):
http://sourceforge.net/projects/gfourier/
http://sourceforge.net/projects/fourier-ipal/
 
  • #4
If you want proper GUI, I'd recommend using Qt - it has a QPainter widget which does the painting to the window, and it's really a breeze drawing some basic GUI using the designer and adding the functionality, once you complete the basic tutorial...

as for language - C# is MS-Java clone, it has many built in functions which makes coding for windows faster then plain C++, but it's an interpreted language - which means it's slower then C++.

I've never used D, but I think it would be easier for you to stick with C++, it's better then C in the sense that (if you code right) you code will be more readable and logical, and you could re factor your program with minimal amount of work... while the run time difference between C and C++ is usually negligible... both C and C++ have many mature libraries for everything you can think of, as opposed to new languages like D...

anyway, if you don't want to learn C++ and QT, you can try glut with C for the rendering part... but I'd recommend it only in the case you don't plan to use a GUI... glut can show menus, but that's about it...
 
Last edited:
  • #5
I'd recommend C++, there're plenty of open source image processors you can use. But python also has some cool image processing modules.
 
  • #6
daniel_i_l said:
I'd recommend C++, there're plenty of open source image processors you can use. But python also has some cool image processing modules.

python is elegant and has some very nice modules like scipy and matplotlib, but it's not that fast... its good for making non realtime calculations and prototypes, for realtime I'd recommend either C or C++...
 
  • #7
Thanks everyone for the advice. That's helpful. Now where can I go to get a good C or C++ compiler?

One more question. Just curious, but I'm just wondering how those visualization that come with something like "Real Player" work? What language were they written in? How is a fast moving image like that done? Or how about software to display something like an oscilloscope? It seems like it should be a simple algorithm, but when I tried it previously it always came out too slow. I still need to learn something about animation, if that's what's used.
 
  • #8
The 'express' editions of microsoft's visual studio is free.
There are various tricks you can do to make visualisations without re-calculating every pixel on each frame. You can use colour maps or combine a few different variable functions to get some impressive effects with very few resources - although today they probably just calculate everything for each frame!
 
  • #9
well, I would recommend against the express edition of MS Visual Studio if you wish to redistribute your software...
minGW is a free windows compiler, and eclipse is a free IDE which has some very nice features - there are the obvious ones like auto-completion, got to definition, debugging interface etc. and there are some i haven't found anywhere else like auto-closing of parenthesis and quotation marks.

the advantage of using minGW (which is a port of gcc for windows) is that you can compile the same code for almost every OS out there, and you're not limited to windows.
another advantage over the express MSVS is that you only need to supply one dll with your program for it to run on another windows machine, while with microsoft's express compiler you'd have to supply the whole redistributable run-time environment for visual studio...

as for your question about displaying a moving picture - modern software utilize the drivers of the graphic device through an abstraction layer, in windows it's direct X or openGL (the latter is used on many other OS's as well).

the memory on you video card is much faster then your main RAM, and it probably has a Graphics Processing Unit too, newer video cards (those made after 2005, i think) have video decoders built-in for better video rendering.
drawing something you computed from the main RAM is called software rendering, it is a slow process for the reasons I've just mentioned... if you want to make use of your hardware, you must use direct X or OpenGL for rendering.
 
  • #10
DSR said:
Hello.

I want to find a computer language for doing real-time interactive graphics. I want to be able to operate on each point of an image in real-time. For example ... What would be the best language for this task?
...

I would suggest C (gcc) and OpenGL .
Very good performance + They are free + You can run any OS (Unix,Linux,Microsoft)
 
Last edited:
  • #11
I would suggest the use of the CImg Library : http://cimg.sourceforge.net

This is an open-source C++ Image Processing Library, which is very simple to use,
free and multi-plateform. It has a lot of classical image transforms implemented (including Fourier Transform).
It allows image display and interaction as well, using generally very few lines of code.
(see the tutorial for an example of code : http://cimg.sourceforge.net/reference/group__cimg__tutorial.html )

There is an example of interactive Fourier filtering included in the example codes of the package.
 
Last edited by a moderator:
  • #12
Interesting. How can there be so many free items like - OpenCV, express MS Visual Studio, MinGW, Eclipse, CImg Library, C (gcc) and OpenGL - available? Are they of good quality? I won't be compromising my system's security by using these, will I? How do I get a hold of these? What does the "gcc" refer to? And learning which of these would be of greatest value to me in the job market, even an entry level position, not that that is my primary motivation in this case?

And what would be the best source for learning these? Is there an OpenCV for Dummies?
 
Last edited:
  • #13
Not everyone sees it as a benefit to the programming community at large to design software, make it closed source, and sell it for a profit. My system right now comprises strictly of free open source software. As I stated in post #3, you can find lots of these open source software on Sourceforge or by simply searching for it via google. The good thing about having your source out there is that its open to scrutiny of professionals.

GNU GCC is just a (free) compiler collection for various languages.
http://gcc.gnu.org/

I cannot comment on which of the libs would a better investment job wise.
 
Last edited by a moderator:
  • #14
DSR said:
Interesting. How can there be so many free items like - OpenCV, express MS Visual Studio, MinGW, Eclipse, CImg Library, C (gcc) and OpenGL - available? Are they of good quality? I won't be compromising my system's security by using these, will I? How do I get a hold of these? What does the "gcc" refer to? And learning which of these would be of greatest value to me in the job market, even an entry level position, not that that is my primary motivation in this case?

And what would be the best source for learning these? Is there an OpenCV for Dummies?

MS Visual Studio Express is not really http://www.infoq.com/news/2007/06/TestDriven-Express-Emails" ...
it is designed to be a crippled version for educational purpose, for most people what visual studio express has to offer is more then enough, and it doesn't cost you money - but when a tool you have is limited in it's functionality and you have no legal and little technical ability to add the functionality you want - it is not really a free tool.

You must make the distinction between free software - which means you got access to the source code, and you can change it as you will.
and "freeware" which you don't pay for, but the only one able to add features is the author, and he is the only one in control over the program.

there are many "freeware" with spyware, like WhenU SaveNow which comes with BSplayer or with deamonTools - but open source software -NEVER- comes with commercials, nagging screens, spyware and the likes...

there are also those who claim that if everyone can see the code - then it's easier to spot weaknesses in it and attack it.
but remember that when everyone sees the code, these weaknesses are being found and fixed faster.
closed source code can be very insecure, and no one will know about it, except those who are interested in using these weaknesses, and the author (or team).
 
Last edited by a moderator:
  • #15
Those are all very good suggestions, but they are all graphics libraries. To use these in the first place I need a compiler. Is there somewhere can I get a good compiler that won't run hundreds of dollars? Are there free compilers that I can download from the internet?
 
  • #16
DSR said:
Those are all very good suggestions, but they are all graphics libraries. To use these in the first place I need a compiler. Is there somewhere can I get a good compiler that won't run hundreds of dollars? Are there free compilers that I can download from the internet?

gcc (or minGW for windows) is NOT a graphics library, and eclipse is NOT a graphics library either...

have a look at it here:
http://www.mingw.org/download.shtml#hdr6"
i recommend the automated installer which will download the required packages and install them for you: http://sourceforge.net/project/down...or=surfnet&filename=MinGW-5.1.3.exe&74818309"
and take a look at http://www.eclipse.org/downloads/do.../20071103/eclipse-cpp-europa-fall2-win32.zip" for you IDE needs...
 
Last edited by a moderator:
  • #17
DSR said:
Those are all very good suggestions, but they are all graphics libraries. To use these in the first place I need a compiler. Is there somewhere can I get a good compiler that won't run hundreds of dollars? Are there free compilers that I can download from the internet?

Read post #13.
 

1. What is a graphics language?

A graphics language is a programming language specifically designed for creating and manipulating visual images. These languages have built-in functions and commands for creating shapes, colors, and textures, as well as animations and interactions.

2. Why is it important to have a good graphics language?

Having a good graphics language is important because it allows for efficient and effective creation of visual content. It can also improve the quality and realism of the graphics, making them more appealing and engaging for viewers.

3. What are some examples of good graphics languages?

Some popular graphics languages include OpenGL, DirectX, and WebGL. These languages are widely used for creating 2D and 3D graphics in video games, virtual reality, and other visual applications.

4. Can anyone learn a graphics language?

Yes, anyone can learn a graphics language with dedication and practice. However, having a strong foundation in mathematics and computer science can make the learning process easier.

5. How can I determine which graphics language is the best for my project?

The best graphics language for a project will depend on the specific needs and goals of the project. Consider factors such as the type of graphics needed, compatibility with other technologies, and available resources when choosing a language.

Similar threads

  • Programming and Computer Science
Replies
8
Views
878
Replies
46
Views
3K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
10
Views
2K
  • Programming and Computer Science
Replies
6
Views
1K
  • Programming and Computer Science
Replies
11
Views
1K
Replies
6
Views
1K
  • Programming and Computer Science
Replies
29
Views
2K
  • Programming and Computer Science
Replies
14
Views
4K
  • Programming and Computer Science
Replies
16
Views
2K
Back
Top