i have something that requires a matrix of values, similar to pokemon:
i have a class object for each of the types, is there a pattern or a good way to implement this, as a middle layer or in the classes?
This is an OpenCV2 question.
I have a matrix:
cv::Mat_<Point3f> points;
representing some space curve. I want to smooth it (using, for example a Gaussian kernel).
I have tried using:
cv::Mat_<Point3f> result;
cv::GaussianBlur(points, result, cv::Size(4 * sigma, 1), sigma, sigma, cv::BORDER_WRAP);
But I get the error:
Assertion failed (columnBorderType != BORDER_WRAP)
hi all
Histogram equalization is simple with histeq function but when it comes local hist. eq., im supposed to use a neighbourhood and move it along the image matrix and do it locally at each iteration. I wonder how I can implement it with Matlab, is it possible if i use histeq for each neighbourhood or is there any other predefined m-function for this operation.
Hello
I want to get N random numbers that the sum of them is a value.
For example, let's suppose I want 5 random numbers that their sum is 1
Then, a valid possibility is:
0.2 0.2 0.2 0.2 0.2
Other possibility is:
0.8 0.1 0.03 0.03 0.04
And so on. I need this for the creation of the matrix of belongings of the Fuzzy C-means.
I am trying to create a piece of software that can be used to create VERY large (10000x10000) sized bitmaps. All I need is something that can work in monochrome, since the required output is a matrix containing details of black and white pixels in the bitmap. The closest thing I can think of is a font editor, but the size is a problem.
Is there any library out there that I can use to create the software, or will I have to write the whole thing from the start?
I would like to compute both the sine and co-sine of a value together (for example to create a rotation matrix). Of course I could compute them separately one after another like a = cos(x); b = sin(x);, but I wonder if there is a faster way when needing both values.
How can I determine the current transform that's being applied by an html5 canvas.
It seems that it only supports two methods for dealing with transforms "transform", "setTransform" but I can't seem to discover the results of applying the transforms.
Short of tracking them all myself and duplicating the the matrix mathematics that it must be doing natively, how can I figure out the current transform?
I'm sure there's not just 1 answer to this but, do game engines actually change the vectors in memory, or use gltransformations? Because pushing and popping the matrix all the time seems inefficient, but if you keep modifying the verticies you cant make use of display lists. So I'm wondering how it's done in general. Thanks
I have some matrix multiplication operation. I want to parallelize the execution of those operations through multiple processors.. This can be done on high performance computing cluster using MPI (Message Passing Interface).
Like wise, can I do some parallelization in the cloud using multiple worker roles. Is there any means for doing that.
Hello everyone,
I am using Silverlight 3.0 + .Net 3.5 + VSTS 2008 + C# to silverlight application.
I want to learn TranslateTransform and RenderTransformOrigin, could anyone recommend me some tutorials? I am a newbie of this area. And I did not find anything which is good to learn for a newbie from MSDN (correct me if there are some good stuff). :-)
BTW: I am headache about the coordination transformation matrix, it is great if the tutorial could cover this topic.
thanks in advance,
George
Given the adjacency matrix of a graph, i need to obtain the cromatic number (minimum number of colours within you can paint every node of a graph). preferably it should be a java algoryhtm, and i don't care about performance. thanks.
Can anyone help on how to use the matrix scaletype to zoom an imageview and also how to use the translate method so that it can be focused at the center? I have tried using webview to be able to use the zooming and scrolling functionalities i needed but it is not nice to look at.
I am trying to build a data processing program. Currently I use a double matrix to represent the data table, each row is an instance, each column represents a feature. I also have an extra vector as the target value for each instance, it is of double type for regression, it is of integer for classification.
I want to make it more general. I am wondering how what kind of structure R uses to store a dataset, i.e. the internal implementation in R.
I am reading, on my own (not for HW) about programming, and one exercise involved programming Pascal's triangle in R. My first idea was to make a list and then append things to it, but that didn't work too well. Then I thought of starting with a vector, and making a list out of that, at the end. Then I thought of making a matrix, and making a list out of that at the end.
Not sure which way to even approach this.
Any hints?
thanks
I can initialize float32x4_t like this:
const float32x4x4_t = { 0.0f, 0.0f, 0.0f, 0.0f };
But this code makes an error Incompatible types in initializer:
const float32x4x4_t =
{
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
1.0f, 1.0f, 1.0f, 1.0f,
};
float32x4x4_t is 4x4 matrix built as:
typedef struct float32x4x4_t
{
float32x4_t val[4];
}
float32x4x4_t;
How can I initialize this const struct?
Hi Folks !
So I am having an issue on my entrepreneur business opportunity rating matrix :
I would like the radio buttons to stay on the same line.
The problem is that I don't know how I should process because if I give a fixed minimum width for the cell, i'm not sure it will display properly on other browsers, and if the cell is to big I loose the alignment of the radio buttons.
Do you guys have a CSS/Javascript (jQuery) trick that would fix this ?
Thank you
I am trying to create a 2D array with vectors. I have a file that has for each line a set of numbers. So what I did I implemented a split function that every time I have a new number (separated by \t) it splits that and add it to the vector
vector<double> &split(const string &s, char delim, vector<double> &elems) {
stringstream ss(s);
string item;
while (getline(ss, item, delim)) {
cout << item << endl;
double number = atof(item.c_str());
cout << number;
elems.push_back(number);
}
return elems;
}
vector<double> split(const string &s, char delim) {
vector<double> elems;
split(s, delim, elems);
return elems;
}
After that I simply iterate through it.
int main()
{
ifstream file("./data/file.txt");
string row;
vector< vector<double> > matrix;
int line_count = -1;
while (getline(file, row)) {
line_count++;
if (line_count <= 4) continue;
vector<double> cols = split(row, '\t');
matrix.push_back(cols);
}
...
}
Now my issues is in this bit here:
while (getline(ss, item, delim)) {
cout << item << endl;
double number = atof(item.c_str());
cout << number;
Where item.c_str() is converted to a 0. Shouldn't that be still a string having the same value as item? It works on a separate example if I do straight from string to c_string, but when I use this getline I end up in this error situation,
hints?
Hi
There is a list box with some items in it. Also there is a grid with 3x3 matrix. The user will be dragging an item and dropping on one the cells of grid.
Most of the samples I found are about dragging-dropping from one listbox to another listbox. But I want to drop in one cell of grid. How can I achieve this?
Please advise. thanks
PJ
I need to create a function to rotate a given matrix (list of lists) clockwise, and I need to use it in my Table class. Where should I put this utility function (called rotateMatrixClockwise) so I can call it easily from within a function in my Table class?
We are trying to set up a Hudson server and share it between different projects. Hudson authenticates users against our Windows domain AD, and the project based security matrix makes it easy to manage who can access which projects.
Remaining issue is, that most of the projects use git over ssh. Is there a way to make shared Hudson access git so that each project could create their and manage their own jobs without compromising security?
I have two points and I want to know the line which is joining them.
I don't want to draw the line.
I want to create a matrix with all the points which formed the line.
In the future, I want to solve if two points belong or not to a shape. And this is the first part.
Let's say I need to save a matrix(each line corresponds one row) that could be loaded from fortran later. What method should I prefer? Is converting everything to string is the only one approach?
I have an xls sheet called Tickers (matrix 1 column 500 rows) with yahoo tickers. I want matlab to download the historical data for last 5 years for each stock ticker into a separate xls spreadsheet and save it in a given directory with title of the sheet = ticker. So that means i want a code that will create and save 500 tickers worth of data in 500 separate spreadhseets :) can anyone help or direct?
I find that a lot of the time, OpenGL will show you it failed by not drawing anything. I'm trying to find ways to debug OpenGL programs, by inspecting the transformation matrix stack and so on. What is the best way to debug OpenGL? If the code looks and feels like the vertices are in the right place, how can you be sure they are?
I have a data file which contains integers say in range 0-255 containing about 1000 integers which are random in nature.I want to use that as a mask or to multiply an image which is in RGb and another image which is in gray format. HOw do i go about this, how do i convert/represent this data file in matrix format of image dimension ?Kindly suggest.
also is it possible to obtain a 3D histogram?