I'm fairly new to python programming and definitely new to simpleITK. I'm trying to put together a segmentation filter that can segment out the liver from 3D images. Because i'm so new to programming in general, i'm not sure where to start. I've looked at the simpleITK notebooks which go over some filters for segmentation but overall i'm pretty confused, mainly, if i want to use multiple filters does everything go in one .py file ... ? I was hoping someone could guide me towards a starting point or tell me about a tutorial i could read through to figure out what to do.
Thanks!
This PyScience post has a very nice tutorial on image segmentation using SimpleITK in python.
With a bit more information on the your problem, I might be able to provide some more specific help (i.e. what type of images are you using, do you know how to read an image into SimpleITK, are you looking for a completely automatic solution or is manual intervention allowed, etc.)
Related
I've recently come across a new type of captcha and am just curious about how someone would go about writing code in Python and OpenCV to solve it.
I'm a beginner in the field of image processing and am reading a lot about it online. I've written some basic code to solve some simple text-based captchas, but this one has me stumped. If you notice, the objects have a lot of properties modified i.e. they've been scaled, rotated, made transparent, re-colored (change of hue, saturation, brightness etc.) and possibly more.
This seemed similar to solving ReCaptcha, so I read up about that. It seems the most common way to solve something like this is to use a neural network and some form of learning algorithm. I'm interested where I could learn more about this.
However, what if I don't have enough training images to actually make a learning algorithm possible? If I have only 100 or 200 images, that wouldn't be enough. What can be done in this situation?
I am a beginner here, so please forgive my lack of knowledge here. Also request you to answer keeping this in mind.
I have this picture. I need to identify the animal in this picture as shown using an image processing algorithm. I'm thinking of using Python for this. But I don't know which algorithm to use and I don't know where to start. Where should I start?
image
The best place to start is fast.ai. You will find the videos you need and the code. You can do it on any computer, even a cheap laptop. You will also want to look into LIME model explanations for image classifiers.
I am working on a project where I need to programmatically add a text to an image such that the text conforms to the surface so that it looks much more real-life.
Here is an example of what I am talking about:
https://www.youtube.com/watch?v=huvysaySBrw
I am fairly new when it comes to programmatic image editing. I have gone through quite a bit of documentation of ImageMagick and similar libraries. But didn't find anything that might help me so far.
I have seven of star field images taken with CCD. Extensions of them are FIT. I'm trying to align them by Python but, i have confused. This time is my very first attempt to align images. I found a few module related with alignment of fits images but they seem to me very confusing. I need a help.
The APLpy module (https://aplpy.github.io/) does what you need to do.
However, it might not be the most straightforward thing to use for a first-timer.
What I would recommend is using PyRAF, which is a python wrapper for the IRAF data reduction software developed by NOAO (National Optical Astronomy Organization) in the 80's/90's to deal with CCD data reduction.
You can get pyraf by typing pip install pyraf. Once you have pyraf, I would recommend following Josh Wallawender's IRAF tutorial; skip to Section V ("Basic Reduction Steps for Imaging Data"). Keep in mind you are using PyRAF, so any IRAF-specific things (sections I-IV) don't necessarily apply to you. PyRAF is a much easier to use system.
The specific PyRAF tasks you need are imalign and imcombine. You'll also need to give a file with the rough shifts between each image (the help file for imalign is a fantastic resource, btw, and you can access it via epar imalign and clicking on the "Help" button when the GUI pops up).
I hope this gives you a starting point. There are other ways to do image combining in python, but astropy is kind of finicky for first-time users.
I want to develop a 3D file viewer in kivy and python that reads and displays .asc mesh files of the format:
x1,y1,z1
x2,y2,z2
........
xi,yi,zi
What I have thought so far is to use a method similar to beginShape() of Processing so as to begin drawing a 3D shape then use a for-loop to append each point respectively.
I have also found that kivy example which parses .obj files and then displays them. Do you have any ideas on how can I make a similar ascparser and try to display my files?
Any help is greatly appreciated
I have also found that kivy example which parses .obj files and then displays them. Do you have any ideas on how can I make a similar ascparser and try to display my files?
Your best strategy at the moment is probably to read the objparser and try to understand what it is doing. The important thing is building a list of points and normals, which are passed to opengl via a Mesh with a custom vertex_format and custom shaders. In principle it wouldn't be very hard to do the same thing for your own filetype just by comparison with the .obj code, though you will need some understanding of what's going on (you can read about opengl and read the kivy source, if you haven't already) to make significant changes.
This is really an advanced topic right now, Kivy has very few pre-built wrappers to 3d opengl rendering. The backend is fully capable (so the 3d rendering example isn't that complex, for instance), but you probably do need some understanding of what's going on to accomplish things like your own task.
There are also a few other examples of 3d rendering in Kivy, which you might find helpful. nskrypnik has several repositories doing just this (see kivy-trackball, kivy-3dpicking, kivy-rotation3d), and seems to have begun implementing a proper 3d api in the kivy3 repo, though this is not complete and I suggest it as something you can learn about by reading, not something that can necessarily do what you want right now. The other nice example I've seen is a 3d inspector POC by tito, though it's just a proof of concept and not a polished product.