Watershed algorithm – CT Lung segmentation [closed] - c++

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am searching for source code to segment Lung in CT images using watershed algorithm. Please let me know if you find any website / source code.

Relevant algorithms:
morphological watershed method (Meyer)
modified watershed algorithm (Beucher, Meyer)
gradient descent or rainfall algorithm (Osma-Ruiz)
watershed immersion algorithm (Vincent-Soille)
Some Source code here

Wikipedia might help.

OpenCV library has the implementation of Watershed algorithm.

The Insight Toolkit is a comprehensive image processing framework for segmentation and registration of medical images.
There are many specialised algorithms for processing medical images, including the Watershed algorithm. Some of the examples are very similar to what you describe.
I strongly recommend reading the ITK Software Guide book before undertaking such a significant project.
Furthermore, it is very important to choose a library that correctly deals with medical images and the special attributes and requirements they have (for example, patient orientation, anisotropic voxels, etc). Most libraries do not handle these aspects correctly, while ITK has been designed from the ground up to support all the complexities of medical imaging applications.

Related

Drawing lines with boost::gil? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I need to draw some lines on an (off-screen) image. I'd like to use boost::gil because the lib is already integrated in my project.
I want to draw a line from start to end point in a 2dim array
Can anybody give me a quick example how to draw a line using gil?
Thank you.
GIL itself is very much concerned with storage of images and pixels in various formats and converting between them... but no more than that. user1929959's answer is using a GIL extension which facilitates interoperability of GIL with OpenCV and then uses OpenCV's line drawing (but OpenCV doesn't come with boost so you'd need to add that into your project too).
For high quality antialiased line drawing AGG and Cairo might also be worth considering (although you'd need to figure out how best adapt GIL images to their own image buffer types). But if you just want basic one pixel wide lines, consult any basic computer graphics text for some Bresenham's line algorithm pseudocode which could be trivially implemented using pixel-setting.
First take a look on boost::gil tutorial. You can find an example in drawing test, from where can easily extract method to drawing line.

Matching melodies [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I'm trying to figure out an approach to compare two melodies to see how similar they are. Timbre doesn't matter. So if I had two recordings, one of a flute playing Happy Birthday and one of a Trumpet playing the same thing at the same pitches and tempo, it should consider them a match.
Is there a .NET or C++ library that can do this? If not, can someone give me an idea of what techniques I would need to do something like this?
Aubio has a C++ interface and several methods for performing pitch detection.
Since you are assuring that pitch and tempo will be the same and you seem to be ruling out harmonies, you can measure pitch over time and compare the two results.
Your comparison algorithm will require trial-and-error refinement. Keep in mind:
noise, timbre, and volume fluctuations can make the pitch at any moment a subjective topic
real-world performers can have similar pitch and tempo, but it's unlikely that they'll be perfectly the same.
The two songs may not start at the same moment in the recording.

Insert images as part of a QR code? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
I'd like to be able to generate custom QR codes that include image/logo designs as part of the actual QR code. Something like detailed here: http://mashable.com/2011/07/23/creative-qr-codes/
Where can I find guidelines on how I can manipulate the QR code that's generated for, say a URL, and still leave it 100% readable/scannable?
Steps of what I'd like to be able to do:
Generate QR Code for something, like a web address. (Already doing this with google charts)
Insert an graphic/image into the code itself, like a logo.
Scan it, and get the URL from step 1.
There are no hard and fast rules for what distortion will cause a scanner to fail. While the code itself is standardized, there are no standards for the algorithms that detect a code from an image, including handling real life distortion like perspective and lighting. Different hardware and software perform differently.
The image at the bottom of http://www.swetake.com/qr/qr1_en.html shows some of the "special" areas of code. It's best to leave those areas, all the black, white, and cyan areas, alone. There are additional reserved areas in all but the smallest codes. These show up first in the the lower right quadrant of the code but get repeated multiple times as the code gets larger. Those should also be left intact, particularly for smaller codes.
Changes to the remaining area can generally be corrected if sufficient error encoding is used when the code is created but, again, a lot depends on capture conditions. An unchanged code will always have the highest probability of decoding.

How to render ocean wave using opengl in 3D? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 11 years ago.
How to render ocean waves using opengl in 3D? Any reply will be welcome.
Edit:
Is there any source code that renders ocean waves but not using an other sdk or api? It's difficult to learn how render it by read OSG source code maybe. So any tutorials about it will be ok, it is very good that it attach the source code.
Christian (above) is right. Currently your question is very broad and difficult to answer. You might want to do some research yourself and then ask a more targeted question.
Start looking at shallow water equations for example. (I'm skipping full fluid simulations here for the moment) Or read Tessendorf's "Simulating Ocean Waves". Or have a look at Cem Yuksel's wave particles. Even if you don't end up implementing any of it, the references will be a good resource for you. Another one might be this collection of links.
Not really a clear answer, but give us more to go on and we can point you in a more specific direction.
Rendering realistic looking water is extremely difficult. Luckily there are tools to make it easier, like OSGOcean, which can render some quite impressive waves.

Is there any free or commercal jpeg decode which is really fast [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 10 years ago.
I am using c++, libjpeg for decoding jpeg file.
I find it is not fast enough, is there any method to make it faster by setting some compile parameter?
or are there any other lib can open jpeg files more faster?
now it takes about 750ms to open a 4368 * 2912 4m jpeg image.
I wish this can be reduced to 150ms.
Many thanks!
Added:
IJL seems faster than libjpeg:)
The fastest way is not to decode it at all. Usually you can use a low-res preview first; that requires only the low frequencies. For a 546 x 289 pixel preview, you in fact only need the (0,0) (DC) component.
There's the Intel Performance Primitives which contains JPEG coding/decoding implementations
Also see http://sourceforge.net/projects/libjpeg-turbo/ for a drop-in replacement of libjpeg that uses SIMD instructions for a significant performance boost.
I use libjpeg from ijg. It's documented how to modify for your purposes, like coding/decoding in memory.
I think DirectX and libSDL can decode jpegs - although libSDL might use libjpeg for decoding.