Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preprocessing #9

Merged
merged 7 commits into from
Nov 26, 2014
Merged

Preprocessing #9

merged 7 commits into from
Nov 26, 2014

Conversation

Jtfinlay
Copy link
Contributor

Preprocessing is done (sorta, kinda, good enough).

Input:

  • Some sort of image (see driver.m)

Output:

  • Cell array of features, where each cell contains data for a pixel grouping. Features include:

Width, Height, Pixel Count, Midpoint (by pixel density), X, Y

This closes #4 and contains most of the shit needed for #7 .

As discussed before, I need two people to check this pull request. First person can comment approval, second person comments & merges.

Enjoy!!

Run the the following once, since it will install the packages for
you:

> pkg install packages/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are Octave-specific packages? We run this on the Octave command line?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are octave-specific. I doubt they'll work on Matlab.

Just install them once on the command line and they'll stay installed. My driver has a line to ensure the image package is loaded.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How long is this supposed to take? I think octave is hanging...

FYI for anyone else installing the packages, it takes several minutes with no feedback whatsoever.

@isupeene
Copy link
Contributor

Other than my comments, looks fine.

@Jtfinlay
Copy link
Contributor Author

Thanks. I fixed and am just testing the changes. Should have an update in a bit. Afterwards I'll test your pr.

@Jtfinlay
Copy link
Contributor Author

Fixed stuff. Tell me what you think.

@isupeene
Copy link
Contributor

I can't say for sure, but this feature set might not give us good results. For example, look at the bottom-right example in Testing7.jpg, which is a :|. Since the mouth is slanted downwards, the y-centroid is lower than the y-value, making the features almost indistinguishable from a :).

Anyway, that's just a theory... I can't say anything for certain.

for k=1:min(numel(B), feature_count),
[features(k).width, features(k).height] = calcDim(B{k});
features(k).x = min(B{k}(:,1));
features(k).y = min(B{k}(:,2));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this x and y are still reversed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shiiit, okay.

@Jtfinlay
Copy link
Contributor Author

You're completely right for using it on it's own, but I assumed that we would be passing in the pixel matrix as well, like we did in the assignment. I'm in etlc if you'd like to discuss this.

The current measured features are those that I rationalized being the most straight forward considering our limited implementation time.

@isupeene
Copy link
Contributor

Ah, OK.

@Jtfinlay
Copy link
Contributor Author

Fixed that x/y problem.

@isupeene
Copy link
Contributor

Looks good.

features(feature_count).x = [];

% 1. Threshold the image
img = rgb2gray(image);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using rgb2gray doesn't work on windows. Not sure why

@StevenGerdes
Copy link
Contributor

It seems good. I don't think it matters that the changing to black and white doesn't work on windows so I guess I will merge.

StevenGerdes added a commit that referenced this pull request Nov 26, 2014
@StevenGerdes StevenGerdes merged commit 2f69b52 into IPPETAD:master Nov 26, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Learner pre-processing
3 participants