Library to segment and classify binary or grayscale images [closed] - java

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I am interpreting scientific (STEM) images into their component parts and adding semantics. These images are born digital, noise-free and either binary (monochrome) or have a small number of colours. I would like Java libraries/methods to partition the images into the whitespace-separated components and to identify (classify) the resulting segments. A typical image is:
where I would want the extracted segments to include numerals and other characters (some rotated) and the asterisks in the diagram. [I will use other methods to extract the geometrical components - e.g. the bars) . I would also like the library to identify identical segments (e.g. 6 zero characters, 5 decimal points). I have successfully used Tesseract for characters but many of the segments may not belong to a Unicode character set (e.g. purpose-created symbols).
UPDATE: I have opened a bounty. I am only interested in libraries, NOT suggestions for algorithms as I have already written a prototype one. If the functionality is part of a larger system (e.g. I think JBIG2 has this functionality) please make it clear where the entry points are.
NOTE: "born-digital" means that the image was created without noise, clean lines unlike - say - scanned documents.

I am only aware of openCV. With this you can analyze your image like:
binarizing it (if you have a few colors or greyscale)
gather blobs in Mat-objects
get the position of those Mats to get the correct label (which should be a Mat for each letter)
and then apply your algorithm to those Mats

Related

Converting time domain to frequency domain in Java [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I have 2 arrays containing time and voltage. I would like to convert time domain to frequency domain in Java. I would like to use FFT. If there is any open source library I could use, please point me to it. I have done a research and found few algorithms but they are asking for real part and imaginary part. If anyone got idea regarding that, please let me know how I could use that in my context.
Code I have found so far
Here is one library:
http://www.fftw.org/download.html
You can also use R with Java. See this link:
Java-R integration?
If you are not familiar with R check their home page r-project dot org (I can't post more links)
While I haven't checked the implementation you link to, you should be able to use that one by suppling 0s for the imaginary part. In that case you are going "forward", i.e. set DIRECT to true transforming from time-domain to the frequency domain. The function will return an array containing real parts of the frequency in even numbered seats, and the imaginary part in odd numbered.

mahout Spearmans Correlation java [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
I'm using mahout KMeansDriver to build clusters, and want to use Spearman as DistanceMeasure.
Can I find this algorithm in java or do I need to write it myself?
I didn't find any examples for that on web.
Do not use k-means with other distance measures.
It may stop converging.
K-means is designed to minimize variance. Your distance function must also minimize variance, otherwise you lose the convergence property. For guaranteed convergence with other distances, see partitioning around medoids (PAM) aka k-medoids.
Correlation measures are a good example of distances that do not work with k-means:
Consider the two vectors, and absolute spearman correlation: dist=1-|r|
1 2 3 4 5
5 4 3 2 1
Obviously, spearman correlation is -1, and these two vectors are considered "identical".
However, k-means will now compute the mean of these two, which yields the constant vector
3 3 3 3 3
which is as dis-similar to these two (in fact, it's correlation with anything isn't even well defined). In other words: the mean does not minimize absolute correlation, and
you shouldn't use this distance function.
Variance = squared Euclidean
This is why you should be using k-means only with squared Euclidean distance.
On L2 normalized vectors: Variance ~ Cosine
This is easy to see when looking at the definition of cosine similarity, and the reason why spherical k-means also works.

Parsing spreadsheet syntax [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself.
Questions asking for code must demonstrate a minimal understanding of the problem being solved. Include attempted solutions, why they didn't work, and the expected results. See also: Stack Overflow question checklist
Improve this question
I'm working on a basic spreadsheet editor (all written from scratch) with my Java class. I was tasked with writing the function package (to analyse the content of a cell and output the calculated result).
Currently I can parse an expression such as 1*(2+3)^4-5%6 by converting it to RPN and then calculating the result. Now I'm working on adding cell names to that expression. What I would like the cell name parser to do is directly replace the cell names by their numeric values, but I'm having a hard time. I've managed to find a way to use regex with one cell (inspired by https://stackoverflow.com/a/10073892/3165024), but I don't know how to make it work with multiple cell names in the expression.
Just a note: Using Regex for this approach is not a correct way. Simple references like A1 can be successfully replaced by calculated
values from referenced cells, but your task can become much more difficult when you attempt to parse more complex expressions such as
cross-sheet references (=Sheet2!A1, ='My sheet'!A1), 3d references (=Sheet1:Sheet3!A1), references in R1C1 style(=R[-1]C3), defined names references(=name), etc.
Replacing cell references for calculated values will disallow you to calculate built-in functions like ROW(A2) (the result is 2),
which expects reference argument instead of a cell value.
I think your RPN form should be enlarged to include items for simple references, 3d references, etc.
The simplest way to create a parser for Excel-like expressions is the use of compiler generators. Have a look at, for example, "The Compiler Generator Coco/R"(http://www.ssw.uni-linz.ac.at/Research/Projects/Coco/), it has a version for java.

Are there any Java graphic libraries that take in RGB values as inputs? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I apologize if this is the wrong place to ask - please let me know if it is, and I will remove this post.
My question is - are there any Java graphic libraries that can take RGB values as inputs and maps those onto a graph? I have been looking at JFreeChart, and a number of the open source solutions, but looking at the documentation, I haven't been having much luck.
Currently, I have a multi-dimensional array that stores 1302 RGB values, which corresponds to 93 rows and 14 columns. As each "index" stores a RGB string in this format i.e. 0,0,0 I hope to graph each individual color into a x-y graph such as like this:
In the above graph, the black is a 0,0,0 value, while the cyan, green, red, etc, are all their individual RGB values.
Since you're asking about plotting heat maps, the answer is yes. Many, in fact, but one such library is jHeatChart over at http://tc33.org/projects/jheatchart
Note that just because your values are encoded as "RGB Strings" doesn't mean you want to ask about using RGB strings, you want to ask about plotting temperature values. The fact that they're RGB strings is irrelevant since we can transform them however we need to make them suitable input.

Object detection/tracking within Java [closed]

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.)

Categories

Resources