depth map extraction from single image [closed] - algorithm

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
please help me.
I'm looking for a simple algorithm that its input is a single image and that's it. The output will be a depth map of the image with colors of pixels according to if they are near or far from the camera.
I am looking for a simple solution without Machine Learning, 3D model, sterioscopic input or user input help. Only a single image.
thank you

What you are asking is in general an ill posed problem.
However, recent work with deep-networks have shown that a depth map can be predicted from a single image.
Here's one such paper: Depth Map Prediction from a Single Image
using a Multi-Scale Deep Network.
From the abstract:
Predicting depth is an essential component in understanding the 3D
geometry of a scene. While for stereo images local correspondence
suffices for estimation, finding depth relations from a single image
is less straightforward, requiring integration of both global and
local information from various cues. Moreover, the task is inherently
ambiguous, with a large source of uncertainty coming from the overall
scale. In this paper, we present a new method that addresses this task
by employing two deep network stacks: one that makes a coarse global
prediction based on the entire image, and another that refines this
prediction locally. We also apply a scale-invariant error to help
measure depth relations rather than scale. By leveraging the raw
datasets as large sources of training data, our method achieves
state-of-the-art results on both NYU Depth and KITTI, and matches
detailed depth boundaries without the need for superpixelation.

Related

How to use Machine Learning/Vision functions to find frames in a scan of film strip? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I have recently taken up film photography. Part of the workflow is to scan the images using a flatbed scanner. Unfortunately this process is very slow. Using some software (Silverfast) you make a prescan, zoom in make a more detailed pre scan, click ad drag around a rectangle which highlights the frame, do this for 12 frames, then set the software to do the full res scans.
I want to automate this process. Rather than layout where each frame is, I want to scan the whole film strip, and then use ML.Net to find each frame (X,Y coordinates of the top left corner) which I will then pass to ImageMagick to extract the actual image.
I want to use ML.Net because I am a .Net developer and may have the opportunity to use this experience later. So although example using OpenCV would be welcome, ML.Net would be preferable.
I am a bit of noob when it comes to ML stuff. My first thought is to try train a neural net, inputting the scan image and outputting the X and Y values. However that seems naive (as the image is 100s of MB in size). I imagine the there are better tool then just a raw neural net.
My searching on 'ML object recognition' didn't seem to help as the examples I found were about finding the Dog or Person in an image not a 'frame'; which could be a dog or a person.
Even a pointer in the right direction, of the correct name for this problem would be a great help.
So, what are the type of tool/functions I should I be using to try and solve this type of problem using ML.net?
This is not so much a machine learning problem as it is an image processing problem. I would think ML.Net is quite overkill.
What you probably want is an image processing library and utilize some form of edge detection or "region of interest" detection.
For example, look at this question:
Detect display corners with Emgu
Maybe I misunderstand what you want to do and you actually would benefit from machine learning; then you probably should pre process your images with an image processing library before feeding them to your model.
Hope it helps.

How do I detect overlapping almost circular objects in MATLAB? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I'm working on a project which involves detecting the red blood cells in the blood. RBCs in the blood are never perfectly circular (usually almost eliptical) and they often overlap.
I've searched and found a number of algorithms, but most work for circles only. However, in my case it needs to work for blood from patients with sickle cell disease, where the RBCs are elongated or sickle-shaped. For reference here is an example source image.
Can you suggest an algorithm or approach to solve this problem?
Any help would be greatly appreciated.
As mentioned in the comments, this question is really too broad to answer completely. However, I can give you some pointers in how to address this.
For starters, get yourself the MATLAB Image Processing toolbox.
"Identify red blood cells" is a deceptively simple-sounding task. The first step with any project like this is to figure out what exactly you want to achieve, then start breaking it down into steps of how you will achieve that. Finally, there is the experimental-developmental stage where you try and implement your plan (realise what is wrong with it, then try again).
Cell counting normally uses circularity to identify cells, but that's not possible here because you state you want to identify sickle cells. The other main characteristics distinguishing RBCs from other cells is the colour and size. The colour is more absolute, so start with that. Then think about size. This is a good tutorial on the process of identifying cells although it is in Python the principle is the same.
So we have:
Apply a filter to your image, either isolating the red channel (RGB) or something more complex. Make it monochrome (we don't need colour data).
Smooth the image (e.g. gaussian filter) to reduce the noise and artefacts
Find regional maxima which are (hopefully!) in the center of cells
Label the regional maxima (this should give you the number of cells)
Watershed to find the whole cells an measure size
Hopefully that is enough to get you started!

More realistic perspective algorithms [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
As I noticed, many 3D games (almost all, I think) use simple algorithm for computing perspective. It works almost ideal, but all objects significantly deform at the edges of the FOV. The sipliest example of this effect is the fact that all spheres at the edges of FOV look not like circles.
The OpenGl function gluPerspective() creates perspective with same defect.
I have a rough idea of better algorithm that, as I think, will fix this problem.
So, question is:
Is there any algorithms that don't have this defect and where I can read about them?
Is there any algorithms that don't have this defect and where I can read about them?
There are several: Spherical projections, Stereographic projections. Cylindrical projections. Tiled panoramic projections, and so on, you name it.
Rastering systems that are based on triangles however have a very important requirement on the projection to work properly: Straight lines must be projection into to straight lines (affine projection). This is the cause for the unpleasant distortions you see. Any of the projections I mentioned above (and many more) can be approximated with OpenGL using an appropriate vertex shader. However to look good the geometry must be sufficiently fine tesselated, because straight edges need to be broken down into sufficiently many segments to allow mapping to curves. A tesselation shader can be used for this. Another approach is rendering a wide field view into a cube map (cube maps require an affine projection for their creation). Then you can apply and other mapping on the cubemap, which leads to more robust results.

Phash vs. SIFT in identifying similar image [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have questions about both sift and phash
First of all, I'm using SIFT to identify similar image in real-time service.
Like pictures by phone-camera, small amount of rotation and blurred effect could be.
And I found Phash. So, I test phash on its demo page. But result made me to sigh.
This is result of above test:
In this test, two images are fixed on x-axis. So they don'
t have rotation. But right images' logo were removed and person was moved to left side. In my eye, This is 'Very Similar'. In addition, SIFT catch this completely.
Now, This is question.
pHash is faster than SIFT?
Is pHash's accuracy reliable?
SIFT's output was too big to use in real-time service. So I must use hash to make output smaller size like LSH(Locality-sensitive hashing). Any other way to I try?
Ok, I got it.
pHash can't recognize rotation and critical movement as same thing.
In case of data space, pHash was dramatically good for using. It is very small size: one image to one hash. SIFT, however, need 128 bytes to get feature point. And there are many feature points in one image.
Eventually, SIFT can identify similar image well than pHash. But more and more size was needed.
In speed bench, I can't test yet. But I think, pHash was faster than SIFT because SIFT have to operate for many features on one images.
If you have another answers for above question, tell me please.

Horizon detection algorithm [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
Can you help me find any information on how to detect horizon on image?
It should not be based on genetic algorithm or neural network.
Just found this question interesting, so I searched the internet for you and came up with following papers/links, the first one perhaps being the most interesting, as it provides a concrete algorithm.
Towards Flight Autonomy: Vision-Based Horizon Detection for Micro Air Vehicles (PDF at citeseer)
Attitude Estimation for a Fixed-Wing Aircraft Using Horizon Detection and Optical Flow (PDF)
Following the citations in the papers you will get to more resources on research in this field.
I'm not sure does this works. But my first approach would be - to detect most frequent line by using Hough transform with such properties:
line should extend up to image boundaries.
line divides image into two regions such that in one of them standard deviation of color is small.
Following procedure will detect horizon:-
Change RGB image to grayscale.
Find the edges in the image using Canny edge detector. Adjust the sigma of gaussian filter.
Apply hough transform on it.
Select the line segment with highest value of J (Equation 5) in
Towards Flight Autonomy: Vision-Based Horizon Detection for Micro Air Vehicles

Resources