Stereograms: Decoding an image from a pattern [closed] - matlab

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 4 years ago.
Improve this question
Inside this pattern there is an image of a kettle. You can see it if you really focus. I'd like to know if I can use Matlab to decode this pattern? Give me some tips or code samples.

Warning
This answer will not attempt to solve this programatically ... Instead it focuses on letting Matlab do the eye crossing* for you however you still need to decide how far* to cross them...
* this terminology sounds wrong but I'm just going to go with it
Method
Simply shifting the image and subtracting it from the original should give reasonable results, choosing the shift however is the tricky part, but once you know it something as simple as imData-circshift(imData,[shiftY,shiftX,0]) should give a good image...
Here is a crude but simple GUI wrapper for the line of code above... (just run the function with an image file name as an argument)
It doesn't give great results for the given image but it works better on some of these
Example
Initial Image
After a little playing

I think "you can see it if you really focus" is not correct. In my oppinion you rather have to defocus to see the hidden image. You have to focus on a thought object that lies behind the image plan.
To extract it with matlab, I would suggest to try some stereo algorithms. Correlate each line of the image with itself and find repetitions. This is the same way our brain sees the hidden image.

This problem is a stereo vision problem: if you cross your eyes correctly you will see the object in 3D. i suggest you have a look at disparity maps: for instance the disparity matlab function (http://www.mathworks.co.uk/help/vision/ref/disparity.html)
computes a 3D image from a pair of 2D image.

Related

Unity2D Simulating height with Top Down Shadows [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
So the problem is the following:
I have been trying to make this flying simulator little phone game, the problem is i cant make the shadow change with a smooth transition...
That White squared is a cloud, and the objective is to have the shadow change size while in the cloud...
I don´t really know were to start, i tried shaders, but i´m not that good with that...
Thx :))
If you are not into shaders, I would look into Masks. Masks basically limit a sprite to only draw within it's boundaries.
In this example, you could have a mask on the cloud. To make it work, have the "nearer" shadow be always drawn, but only in the mask's boundaries (In this case - the cloud) Relevant Youtube Tutorial

cant get Image or Texture of UI.Image in Unity [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 3 years ago.
Improve this question
m_Image = GetComponent<Image>();i am trying to put a list of images and whenever clicked i want to replace clicked image to a plain . as i am a beginner in unity please share your thoughts,,
As shown here the pen image should be replaced in the floor
I believe you should use
GetComponent<Image>().sprite
and set a sprite instead of an Image.
You should use Sprite instead of an image(sprite is a part of images components in unity)
GetComponent<Image>().sprite;
Read more about Sprites
Unity Manual

Generate a grid in Swift using Sprite Kit [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 have an app idea so mocked it up in C# because that's my most fluent language. I now want to port this over to Swift if possible, how hard will it be to generate a grid of 6x6 blocks, each block needs to be separate from each other as I need to change they're properties and detect touches on them. This is the grid I've currently got running on Windows.
Thanks for any help.
There are a lot of different ways to approach this problem, so you need to provide more details. You could do it with a single custom UIView, drawing the current representation of your model in the drawRect method and it would also be able to handle all of the touch events since you can just calculate where the user did the touch in the same way that you calculated drawing the grid and coloring the squares.
But if you want to use SpriteKit, then this tutorial will show you all the details of doing a 2D array, using sprites, tiles, etc.
http://www.raywenderlich.com/75270/make-game-like-candy-crush-with-swift-tutorial-part-1

How to impose a constraint on contours frame by frame [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 implementing some piece of code in MATLAB to track left ventricle wall position in echocardiography images using a contour-based method. Unfortunately in some frames the contour evolves more than it is expected and in some regions the wall does not have good contrast.
Does anyone know a way to restrict contours from unexpected evolution from frame to frame saving both old frame's position and new one's shape?
Thank you all for helping.
Image segmentation is a hard problem. There is no general approach that works well in every situation. How are your contours being defined? Are you doing threshold-based segmentation, or using another approach? Have you tried transforming into a polar coordinate system in the centre of the LV? Have you tried quantifying some sort of 'least-squares' cost associated with moving the contour?
All I can suggest is look at how people solve similar problems. In my field (namely MRI), the best we have a) isn't really all that good, and b) is probably this open-source Matlab 'program' designed for cardiac segmentation called segment (see http://medviso.com/products/segment/features/cmr/). I suggest you look at how they do it, and see if you can adapt the method to work with the (much noisier, much harder to interpret) echo images.
Sorry I can't be more helpful!

What are files with ".des" extension? how can i edit or change them? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I had previously also asked a question on this and was unable to get any concrete reply. I hope this time you guys will help me out.I have graphics files with ".des" extension when I open them in xcode I just see a long number or probably a hash code 1245.5678.2457.3578... like this. Now I want to be able to see these ".des" files in form of image in some software so that I can change them.
I have tried coreldraw and interscope blackbox but it did not work for me.Looking forward to hear from you guys.
DES File: What they are and how to create them
In Open GL ES (this is the name of the low level library for drawing 2d or 3d graphics on your iPhone) you can properly load images only in a specific size - this size is called the “power of two” (read more)
EXAMPLE: 512pixels x 512pixels = 29 pixels x 29 pixels or 1024 x 1024 = 210 x 210
But in real life is really hard to keep all your graphics materials in power of two sizes (POT). In modern OpenGL versions you can find a way to load non-POT images but this is not effective and will eat more memory while holding your textures.
To solve this issue you can put all you small images in to one really big image (sometimes called a resource image, atlas, sprite sheet, sprite list, etc). We call this an Atlas.
So what does DES mean?
A DES file is very tiny plain text file. In this file you can find information about the atlas file including: where to find atlas (resource) image AND describe the position of original image on atlas image.
Basically, this DES file tells us where certain images are in the big ATLAS image.
As example if you have a folder called MainMenu and two files button.png and levelIcon.png after atlas making process you’ll have two DES files button.des and levelIcon.des and two big images MainMenu.png and MainMenu_hi.png ( *_hi.png is for Retina Displays and IPad )