How to create Heatmap of eyetracking points in c# - c#

I have a database that holds data of eyetracking on some videos.
I export those data to an int[,] input matrix for this issue. And then try to create a heatmap.
What I get so far is something like this:
and now I will try to use some gaussian smoothening functions to get a more heatmap like image. but when I used some applications to blur my heatmap, the result is:
but this is not actually what I want it to be. I want something like the heatmaps that you see when you google it, e.g.:
How can I create a "Heatmap" instead of my bitmap?

Instead of plotting points, have you tried plotting translucent circles (maybe 100 pixels in diameter) to see how that looks? Resultant opacity can be converted into blue/green/yellow/red.

Related

How to create charts for integrals

Im writing scientific/educational app. One of the features is calculating integrals aproximation with rectangle and trapeze methods. I want to display f(x) function chart with the results of the calculations where i could mark the areas that are accurate and inaccurate with different colors.
So far, i tried to use charts from DataVisualisation.Charting. For displaying f(x) functions i used Spline chart. In case of rectangle method i tried to use bar chart for aproximation.
There are two problems: firstly, the mesureing point are in the middle of the bars instead of on the right side; secondly, i don't know if it's possible to mark the inacuracies like on the pics above while useing the default library.

Change polygon color programmatically of a digitized image

I don't have knowledge about ArcGIS... But I am working on a program related to that...
I have to do-
Load digitized image in my windows application and after that i have to change polygon color according to client need.
Actually the image is a satellite/drone image, and in ArcGIS my colleague plotting polygons.
I have to load that digitized image in windows application and according to requirement (like differentiate polygons according to area; polygon having area between 0 to 1000 sq.ft. must be in yellow;between 1001 to 1500 - red; etc) I have to change that polygons color programmatically using C#
So my question is, In which format that digitized image must be? so that i can change polygon color...
One more thing I didn't tried anything to accomplish this... Because I don't know about this... So feel free to suggest any relevant solution....
EDIT:
Here are the to images, one is before digitizing and another is a demo of after digitizing
Thanks in Advance

Can I use a bitmap instead of a data source for a WPF chart?

I can draw an empty set of axes, and have some complex code to create a bitmap from my input data. What I'd like to do is use the axes but overlay my bitmap.
The graph I'm creating contains a possible 20,951,040 data points, so drawing the graph to a texture is the quickest way to achieve what I want, and takes a matter of milliseconds to render so I'm happy with the bitmap - just need it to be placed in axes to give some context obviously.

How to create an image with multiple tiles in the background?

I would like to know how I can create one image from many. I would like to create a tile in my windows phone application like in this image (specifically, the People tile):
(source: addictivetips.com)
I have nine pictures, and I would create an image, that I will add like tile to background. Does anybody know how can I create an image that looks like the one in that picture?
I have very little experience in this space, but have you considered creating a control that simply displays up to 9 pictures side by side in a grid like that? You then can bind each image independently & change them out however you want. This article touches on how to bind phontos in WP7 nicely:
http://msdn.microsoft.com/en-us/library/hh286418(v=vs.92).aspx
If you're talking about assembling an actual graphic image like a jpeg or bitmap, you'll need to look at the Image Class, Bitmap Class, and Graphics Class. Essentially you'll need to implement the following steps:
Load the relevant images with From method in Image, typically Image.FromFile.
Determine how many rows and columns you'll be using.
Calculate the total width and height for your layout using the widths and heights of the loaded images with appropriate padding added.
Create a new Bitmap of the appropriate size with the correct background color and iamge format.
Have variables for the current drawing location (x & y).
Have variables for the current row and column in your layout.
In a loop, Create your Graphics object.
Use Graphics.DrawImage to add your loaded image to the layout bitmap.
Increment your drawing row and or column as appropriate.
Calculate your new drawing location.
Repeat until done.
One of the options is to use WriteableBitmapEx
Also you can probably find an answer to your question here: How can I merge two images into one?

Bitmaps in WPF - give watermarking effect and then recover images individually

I am working on a project where I need to play with two bitmaps. I am putting them in a grid one over the other with reduced opacity (to give a watermark effect).
I am rendering the grid to a bitmap using RenderTargetBitmap and saving the bitmap to a file.
Now my requirement is to load the rendered bitmap again and recover the original pictures separately. Is there any way to recover the original images again. I am not able to think any algorithm to implement this.
My aim is to give a watermarking effect and then recover the images individually.
No. The information is lost during "flattening" of the image.
You need to save both images and information about their properties (position, opacity) into single file. And restore it on load.
If your goal is to simulate watermarking and allow later 'dewatermarking', then assuming that you have your watermarking bitmap present at decoding time, you probably can do that. Sure you cannot use your initial approach - just simple merging of two layers is not reversible.
You need to use some reversible transformation, like rotating source image pixel RGB values vector, using watermark image pixel RGB values as parameters. While dewatermarking you just use negative values from watermark image.
Well, RGB vector is not ideal - you can go out of RGB space while rotating it. Probably you can find color space (or some other transformation in RGB space), better suited to your goal.
(English is not my first or even second language, thereby I apologize if you can't understand my idea - just ask over.)
Why don't you try to make it two layers of bitmap?
i wonder if you can use TIFF format, where you can store multiple images. that way on display you can choose to show with/without watermark.

Categories

Resources