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 am looking for an optimized 4-connectivity or 8-connectivity Connected Component Labelling source code in MATLAB or C++. I saw many implementation of connected component labelling (4-connectivity) in MATLAB.
One of the implementations that works faster is the recursive implementation explained here: http://www.mathworks.com/matlabcentral/fileexchange/38010-connected-component-labeling-like-bwlabel
MATLAB has a built-in bwlabeln or bwlabel, which is far more optimized. They claim to use union-find method from two-pass algorithm described in Sedgewick's Algorithms in C, Addison-Wesley. However, it is hard to find any source code of it. Does anyone have idea about it? An optimized code is really needed.
You can indeed work by scanning the image in scanline order and when you meet a component seed-fill it.
You will find two efficient (and very similar) algorithms in Graphics GEMS 1:
A SEED FILL ALGORITHM, Paul S. Heckbert
FILLING A REGION IN A FRAME BUFFER, Ken Fishkin
and with a little effort some implementations. (The papers give Pascal-like code which is easy to translate.)
They run in linear time, use an explicit stack and don't require union-find.
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 6 years ago.
Improve this question
I need to do some sort of priority-based search. Could someone point me to a priority queue implementation in ATS?
You can readily base a priority queue on a binomial heap.
There are two implementations of binomial heaps in ATS. Here are some use-cases:
https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/ATSLIB/libats_linheap_binomial.dats
https://github.com/githwxi/ATS-Postiats/blob/master/doc/EXAMPLE/ATSLIB/libats_linheap_binomial2.dats
I came up with some unsafe C-based max-heap (based on somebody else's gist). I think that it does show that interfacing with C code in ATS, while generally unsafe, is very easy to do.
See the full sample at Glot.io
EDIT: here's another implementation, this time in ATS. It's a bit of a hassle to use, though (too many indexes in the type!), but the key salient feature of this code is that it is type-safe while also being extremely close to a typical C implementation in terms of runtime behavior.
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've started to work with Neo4j. I know there is an opportunity to extend its API with new functionality. Also, I'm interested in algorithms for large-scale graphs.
My question is: Does anyone know any sites or other resources with the latest improvements for large-scale graphs algorithms? Or maybe you can advise me the most effective solutions for some kind of operations, like: finding the shortest path algorithms, clusterization algorithms, nearest neighbour, radius/diameter computing etc.
Thanks a lot!
Much of modern applied graph theory centers on applying computational linear algebra to graph theoretic algorithms. One prominent group involved in such work is John Gilbert's at UCSB: his group put out a piece of software called Combinatorial BLAS for efficiently executing graph algorithms using methods in computational linear algebra.
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 9 months ago.
Improve this question
Currently I was studying the genetic algorithm and I got it very interesting area to work in but as per my new field I am not getting any idea about the topic. So I want to know that "What are the current problems yet to be solved in Genetic Algorithms?".
Thanks!
PS: I read the concepts and still working to improve knowledge in it still ideas and problems are most welcomed.
If I understand your question correctly, I personally think you should rephrase your question to "What are the current problems yet to be solved in Genetic Algorithms?".
In regards to your answer, I'm also studying Genetic Algorithms (GA) and I can't say I'm an an expert, however there some of the things that plagues GAs:
finding the absolute optimal when searching through an in-complete search space. If you need to guarantee absolute best, it is best to user other methods.
Then there is the encoding problem, there are many problems where you can't really encode your problem into a GA.
Defining a sound evaluation function, how you define the best.
Converging in a dynamic environment, GA assumes the environment or search landscape is static
Perform poorly with Boolean evaluation functions (Yes/No, On/Off functions)
For more information of what problems are hard for GAs is this paper, "What Makes a Problem Hard for a Genetic Algorithm? Some Anomalous Results and Their Explanation"
As for applications of GA, the list is huge, see here
1.study The problem
2.analysis the problem
3.make possible steps to draw flow chart
4.draw flowchart
5.end
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 5 months ago.
Improve this question
I'm a novice in the field of ellipse detection/extraction. But I know this topic has a long history. Although there are tons of papers addressing ellipse detection, I can hardly find any C++ implementations of these advanced algorithms such as Straight Line HT (SLHT), Fast Ellipse Hough Transform (FEHT), and Randomized HT (RHT). I'm curious Why the researchers don't put their code online such that more people can benefit from them? Can anyone kindly tell me where I can find any of the C++ implementations? Thanks.
(PS: I'm familiar with OpenCV. I know OpenCV has few implementations such as fitEllipse and HoughCircle.)
A lot of image processing research is done in Matlab, there are generally implementations available in that language. The reason you don't see any C++ implementations is because they would be much more about the details of implementation (memory management, performance, etc) rather than the actual algorithm; Matlab is much more succinct about this.
If you really want to get to learn about image processing algorithms, you'll probably want to learn to read Matlab code.
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
Are there any open-source implementations of an graph-cut algorithm similar to that used for Photoshop's quick select tool? I'm researching for a personal project of making a GIMP tool\plugin similar to PS's tool, but I'm wondering if it's been done before.
I'm not sure How exactly quick select works, but if i had to implement such task - my first starting approach would be to detect area of similar colors. For this one should:
Convert RGB color space to HSV or HSL.
Run edge detection algorithm on Hue values.
Sample edge points to reduce data size.
Run points clustering algorithm.
Filter-out points which doesn't belongs to nearest cluster.
Run convex hull algorithm to dismiss cluster inner edges.
I'm not saying that this approach will work, but still i think that this is an interesting idea to explore.
Good luck!
There is a paper called "Paint Selection" published at Siggraph 2009. It describes a method very similar to Photoshop's quick select tool. You can access the paper from https://www.microsoft.com/en-us/research/wp-content/uploads/2009/08/PaintSelection_SIGGRAPH09.pdf