Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
Is it possible to connvert Pantone colors to RGB? From what I can tell you would need a lookup table of some sort. With thousands and thousands of colors I would never want to maintain this myself so does anybody know of an api?
We use Java so a Java api would work best.
Pantone does provide RGB values for the colors in their database, but they maintain that the database (of colors, and of their RGB mappings) is solely their intellectual property. Licensing information may be available at:
http://www.pantone.com/pages/partners/become_a_licensee.aspx
This is generally not possible, as a Pantone color is defined colorimetrically under specific lighting conditions, while RBG colors are at the mercy of the display gamut and calibration.
In other words, a specific RGB color will display differently depending on the color space (sRGB, AdobeRGB, etc) and also on the calibration and color gamut of the monitor on which it's displayed. There's a whole industry around monitor calibration tools and software, but only graphics and photography professionals generally use calibration.
In short, if you (or anybody) were to come up with a mapping table, it would be valid only for a specific computer and monitor combination, and would be visibly incorrect on many, if not most, other monitors.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
I have an multi-objective optimization problem which I would like to solve, preferably in Java using evolutionary algorithms.
I use a parametric finite element model with a couple of real or integer input values x1...xn describing for example the geometry of the model. Each parameter can have values in a certain interval, e.g. x1 \in [2,10], x2 \in [1,4], ...
My goal is to find the optimum solution for one or more given criteria which I calculate within the finite element model. So the values of the objective function are calculated by the model.
I basically need a framework where I can define optimization parameters with certain intervals (x1...xn). The framework should build an initial population with starting values for x1...xn for each individual. With those values I create my model for each individual, perform my calculations and give back the values of the target funtion. Than the framework does its job and creates a new offspring population.
Is there an evolutionary algorithm framework in Java that can do that?
I had a quick look at TinyGP, Jenetics and JGAP. But these focus on Genetic Programming and Symbolic Regression problems. Or did I miss something fundamental?
You can look at watchmaker api
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I need an algorithm or preferably a library, that will assist with arranging a diagram. I can already draw my diagrams, I just need arranging.
A diagram consists of one or more different sized rectangles, they may be connected. Some rectangles must have fixed positions, and the goal is to minimize total connection length. For example, this diagram where red squares have a fixed existing position, and where green squares should be positioned to minimize total connection length.
An optimal scenario is for me to input a graph, where nodes are rectangles and edges are connections. Nodes would have a certain size and possibly a fixed position. The output will be a set of XY coordinates.
I would like to know either an algorithm or library for such a task, thank you.
I have already looked briefly at JUNG and Graphviz, but I fail to see how they might solve my problem. Also, the final program will be an Eclipse plugin, so I would like to be able to easily bundle any external dependencies.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm using buffered images and the (Graphics).drawLine and drawString methods to manually draw stuff to my game, and I implemented a high scores class that takes input through the keys the user types. I manually created a blinking cursor using the drawLine method in Graphics, but each letter I notice doesn't necessarily line up with the prior letter. The letter M, for example, is larger. Is there a font that has the same number of pixels per letter horizontally? Otherwise I'd have to account a different number of pixels per letter typed, which would take forever.
In other words, is there a font Java uses whose typed characters would align evenly like in accordance with an invisible grid behind it? Any help is appreciated!
According to the docs, there's five fonts (font families actually) that all Java distributions must support:
Logical fonts are the five font families defined by the Java platform
which must be supported by any Java runtime environment: Serif, SansSerif,
Monospaced, Dialog, and DialogInput.
You want Monospaced. You can ask for other fonts by name (such as LucidaConsole, which is a much nicer mononspaced font than the usual Courier), but if you ask for one of those five you're guaranteed to get a valid font back.
These work, for example (or at least return a font):
Font f = Font.decode( "Lucida Console" );
Font f2 = Font.decode( "Monospaced" );
If you want to see all the fonts on your system, you can use this:
String[] fontList = GraphicsEnvironment.getLocalGraphicsEnvironment().getAvailableFontFamilyNames();
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
I search for Java free open source shapes library,
That contains shapes like: Triangle, circle, Square, Polygon and etc'.
Of course it's should be graphics and not textual (terminal \ cmd).
Do you know about good one? Thank you.
Check out two particular ones (if you're still looking) the MyroJAVA program- this one is really designed for robots, but surprisingly has some pretty good Graphics library. http://wiki.roboteducation.org/Myro_in_Java
Also this library from Williams College: http://eventfuljava.cs.williams.edu/library.html
That contains shapes like: Triangle, circle, Square, Polygon and etc'.
With exception to triangle, the Java Graphics API already contains all theses, and to be honest, triangle wouldn't be that hard to implement (it's a closed polygon with 3 points after all)
I'd start by reading through 2D Graphics, in particular Working with Geometry
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I'm looking to do some image processing in Java and I'll be developing in Ubuntu with Eclipse.
So here is my objective:
From a greyscale image, I would like to be able to detect certain sized objects and draw a rectangular frame around them. However, the catch is that this image is captured from a thermal imaging camera so to detect body heat the pixels will have a value within a certain range.
After detecting all the objects in the image, I will need to count them, but that's later.
So here's my challenge. Which tools/apis/open classes can I use to do something like this. I looked around and found some basic manipulations such as rotate, crop, resize. But haven't really found anything I can use.
Where should I look/start?
thanks a lot in advance
ImageJ is very useful:
http://rsbweb.nih.gov/ij/
Although ImageJ is set up as a GUI, you can use it as a library too (I do that too)
You'll have to search for a proper object detection plugin (but there are some floating around...)
good luck!
Eelco
On this page you can find open-source tool for image processing and image mining:
http://spl.utko.feec.vutbr.cz/en/image-processing-extension-for-rapidminer-5
This article fully explains the algorithm you're looking for, and the accompanying source code is here. You can see it in action in this video.
(Disclaimer: I'm the author; but I do think this is very useful, and have successfully used the algorithm a lot myself.)
The algorithm tracks moving objects, finds their bounding rectangle (which the application draws), counts the number of pixels in each objects, correlates them throughout frames as the same object (with an int ID). You may need to do a trival conversion of your grayscale image to RGB (by copying the gray values to all three channels) since the algorithm was designed for color input.
When it comes to commercial computer vision applications, OpenCV and the Point Cloud Library aka PCL are your best friends. And articles like the one linked explains how to use tools like OpenCV to accomplish full stack motion tracking. (The pure Java implementation shows how it works down to the individual pixels.)