Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Continuous Classification

Subject: Continuous Classification

From: Elnaz

Date: 8 Oct, 2011 00:17:15

Message: 1 of 7

Hi everyone,
I am trying to get X and Y coordinate outputs from two classifiers. I use the log posterior probability of two linear classifiers to get these two outputs which are to be representing the X and Y components of a cursor position on a 2-D screen. Source of my signals are coming from 4 magnetic sensors located in 4 corners of a square. First, I transform the raw sensor readings to PCA features and then I feed them into two classifiers. The key issue, however, is that mapping X and Y outputs with respect to each other only gives me a distorted output rather than a perfect square/rectangle shape. The distorted shape is more like a square/rectangle that is been pinched off in the middle of the shape.
My question is how to automatically convert this distorted rectangle back to a rectangle?
I do not want to go for computationally expensive optimization or localization algorithms?

Thank you for sharing your thoughts,
Elnaz

Subject: Continuous Classification

From: ImageAnalyst

Date: 8 Oct, 2011 05:09:25

Message: 2 of 7

On Oct 7, 8:17 pm, "Elnaz " <ebsadegh...@gmail.com> wrote:
> Hi everyone,
> I am trying to get X and Y coordinate outputs from two classifiers. I use the log posterior probability of two linear classifiers to get these two outputs which are to be representing the X and Y components of a cursor position on a 2-D screen. Source of my signals are coming from 4 magnetic sensors located in 4 corners of a square. First, I transform the raw sensor readings to PCA features and then I feed them into two classifiers. The key issue, however, is that mapping X and Y outputs with respect to each other only gives me a distorted output rather than a perfect square/rectangle shape. The distorted shape is more like a square/rectangle that is been pinched off in the middle of the shape.
> My question is how to automatically convert this distorted rectangle back to a rectangle?
> I do not want to go for computationally expensive optimization or localization algorithms?
>
> Thank you for sharing your thoughts,
> Elnaz

---------------------------------------------------------------------------
imtransform() is pretty easy to use. Try that.

Subject: Continuous Classification

From: Elnaz

Date: 8 Oct, 2011 16:58:14

Message: 3 of 7

Let me also add: it is not exactly an image but only two signals that when plotted together as X and Y components, I do not get the same representation I'm looking for. The level of change (distortion) increases as I move further away from the 4 corners. It is like some contraction beginning from the middle of the screen which fades away as I move away from the center (like a 3-D Gaussian function).
I only have 3 borders of the screen (3 sides of the rectangle) which when plotted as (x,y) looks like a pillow. So, I'm looking for a transformation function to somehow flat out the entire screen. I need to build this function using these three borders and then apply it on the testing data which can cover the entire screen i.e. inside the rectangle.
Also, I can not use Matlab'e built-in functions because I need to implement this in C. So, my question is more towards the mathematical solution for this.

Thank you

Subject: Continuous Classification

From: ImageAnalyst

Date: 8 Oct, 2011 17:48:13

Message: 4 of 7

I have trouble visualizing exactly what you're describing. Perhaps
you should post your question and picture/plot/graph in a more
appropriate C/math/non-MATLAB forum so people here don't waste time
developing a MATLAB solution that you can't use or even try. You
might have more luck that way.

Subject: Continuous Classification

From: Elnaz

Date: 8 Oct, 2011 18:47:14

Message: 5 of 7

ImageAnalyst <imageanalyst@mailinator.com> wrote in message <6ff6586c-d03f-4a23-b750-31f421bcec0c@d18g2000yql.googlegroups.com>...
> I have trouble visualizing exactly what you're describing. Perhaps
> you should post your question and picture/plot/graph in a more
> appropriate C/math/non-MATLAB forum so people here don't waste time
> developing a MATLAB solution that you can't use or even try. You
> might have more luck that way.

Thank you for your advice; but, I think answering a signal processing question or any other question for that matter, especially when it does not completely fall into a basic standard category such as regression, interpollation, etc., should be addressed more towards the root of the problem instead of only mentioning the name of the Matlab function that may/may not answer the question. Most important thing is what to do and why, how to do it in Matlab is only a secondary question which can be answered rather easily by referring to its Help.
We should understand what kind of transformation/manipulation we need to apply on our data and have control over it rather than simply pluging it into a function and then interpret the results. It will be more effective/educative/beneficial if we could more discuss the mathematical procedures themselves before going to toolboxes and their functions.

Subject: Continuous Classification

From: Matt J

Date: 8 Oct, 2011 19:55:13

Message: 6 of 7

"Elnaz " <ebsadeghian@gmail.com> wrote in message <j6q5ri$sdl$1@newscl01ah.mathworks.com>...
>
> We should understand what kind of transformation/manipulation we need to apply on our data and have control over it rather than simply pluging it into a function and then interpret the results. It will be more effective/educative/beneficial if we could more discuss the mathematical procedures themselves before going to toolboxes and their functions.
================

Well, if we ignore the fact that this is a MATLAB forum that is meant to be devoted to MATLAB challenges, and if we also ignore the fact that we still don't understand the given data X,Y, how to interpret them, how you are plotting them, and what you see when you do, there is this:

You have a signal/image distortion that you want to undo. In a distortion removal problem, you usually need a mathematical model for the distortion, which relates the given output to the true desired output. You then solve an inverse problem to recover the desired from the given. This usually involves solving some sort of optimization problem, which you said you'd like to do only if the solution is simple. However, whether the optimization can be done simply depends on the mathematical model, which you still haven't described.

Subject: Continuous Classification

From: Steven_Lord

Date: 10 Oct, 2011 04:10:23

Message: 7 of 7



"Elnaz " <ebsadeghian@gmail.com> wrote in message
news:j6q5ri$sdl$1@newscl01ah.mathworks.com...
> ImageAnalyst <imageanalyst@mailinator.com> wrote in message
> <6ff6586c-d03f-4a23-b750-31f421bcec0c@d18g2000yql.googlegroups.com>...
>> I have trouble visualizing exactly what you're describing. Perhaps
>> you should post your question and picture/plot/graph in a more
>> appropriate C/math/non-MATLAB forum so people here don't waste time
>> developing a MATLAB solution that you can't use or even try. You
>> might have more luck that way.
>
> Thank you for your advice; but, I think answering a signal processing
> question or any other question for that matter, especially when it does
> not completely fall into a basic standard category such as regression,
> interpollation, etc., should be addressed more towards the root of the
> problem instead of only mentioning the name of the Matlab function that
> may/may not answer the question. Most important thing is what to do and
> why, how to do it in Matlab is only a secondary question which can be
> answered rather easily by referring to its Help.

If you have a question about the theory behind a technique rather than how
to implement that technique in MATLAB, please ask that question on a
newsgroup dedicated to that technique. For signal processing questions, the
comp.dsp seems to be a good choice of the newsgroup on which to post. Once
you understand the technique, if you need help applying that technique, then
CSSM (this newsgroup) is the appropriate forum on which to ask for help.

> We should understand what kind of transformation/manipulation we need to
> apply on our data and have control over it rather than simply pluging it
> into a function and then interpret the results. It will be more
> effective/educative/beneficial if we could more discuss the mathematical
> procedures themselves before going to toolboxes and their functions.

That's true. However, you wouldn't (usually) ask your doctor about how to
fix this weird knocking sound your car is making, would you? No, you'd ask
an auto mechanic. Similarly, you shouldn't ask your signal processing
questions on CSSM; instead you should ask your MATLAB-related questions here
and your signal processing questions somewhere like comp.dsp where everyone
wants to discuss signal processing and has the knowledge to do so.

--
Steve Lord
slord@mathworks.com
To contact Technical Support use the Contact Us link on
http://www.mathworks.com

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us