|
You can use 2D-fft (or 2D convolution/correlation).
It will work also if there is a rotation on the plus (i.e. there is only a phase rotation) or if there is a scale factor (i.e. the ratio between frequency amplitudes remains constant),.....
but they aren't
V_shr wrote: speedy algorithm
If you want a good and fast way ,probally, your work will be very hard!
Try also something using some pre-processing operation, like noise filters and/or colors thresholds(-> RED plus)
Hope it helps
|
|
|
|
|
_Russell_ wrote: Try also something using some pre-processing operation, like noise filters and/or colors thresholds(-> RED plus)
Good!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I want, I want, I want.
Since this site is not about doing the job for you, but helping you with problems, I will point you in a good direction and wait to see what effort you make.
Search code project for the following types of article
image processing and pattern recognition
Some thoughts to consider are:
1) Are you looking for a specific size red plus or any two crossing lines of any thinkness and any length? It becomes easier if you know the exact size, thinkness of lines and orientation of the "plus"
2) How is the "plus" put on the image. Can it be partly off your image?
For a first cut approach, assuming you know the exact color red (or even the range of colors), try searching through each pixel in your image until you find a red one. Then you need to see if the shape of your plus is in the appropriate adjoining pixels (this is a series of checks over a specific set of offsets from your "found" red pixel. If you get a match, then you have to check some more to make sure that you are not in a field of red.
If your "plus" can be partly off the edge, you will have to compute the remaining portions of the plus and use the approach above with a modified definition of a "plus"
This is brute force. There are probably better ways to do this. But this will get you started.
Good luck.
|
|
|
|
|
|
You are wellcome
|
|
|
|
|
|
Humm...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
|
toxcct wrote: pardon dear ?what's up ?
oops sorry! wrong person
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
VC Forum Q&A :- I/ IV ?
where are II and III
NiLeSh KoRpE
|
|
|
|
|
NiLeSh KoRpE wrote: where are II and III
Still Missing
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
|
Good luck; you'll need it. That's a sophisticated algorithm you're after. I suggest you get a good book on digital processing and don't expect results too quickly.
Steve
|
|
|
|
|
Hi,
for some reason I never receive the WM_LBUTTONUP message. I do receive the WM_LBUTTONDOWN message. Is this normal or I'm doing something wrong???
afx_msg void OnLButtonUp(UINT nFlags, CPoint point);
void CVRGlobalView::OnLButtonUp(UINT nFlags, CPoint point)
{
CTreeView::OnLButtonUp(nFlags, point);
}
Thanks!
-- modified at 9:30 Thursday 11th May, 2006
|
|
|
|
|
LukeV wrote: void CVRGlobalView::OnLButtonUp(UINT nFlags, CPoint point)
{
CTreeView::OnLButtonUp(nFlags, point);
}
What are you trying to do here exactly ?
And also, where are you releasing the mouse button ? Above the control ? And you want to know when the mouse is released above the tree control ?
Then, isn't it a notification message for the tree control itself ? I mean, instead of checking if the mouse is released above your view, check if the mouse is released above the control.
|
|
|
|
|
|
Hi all!
I'm working on a GUI frame work using Win32 C++. This GUI is based on classes and inheritance. I have stacked on something that might seem to be a little stupid! What's the best way to have access to the controls the most, and other vars of a window from another window!
For example:
// File Window.h
class CWindow
{
// Functions
public:
// Vars
private:
// Other vars
protected:
}
// File status.h
class CStatusBar : CWindow
{
// Functions
public:
// Vars
private:
// Other vars
protected:
}
// File MainFrame.h
class CMainFrame : CWindow
{
// Functions
public:
// Vars
private:
// Other vars
protected:
// Status bar control
CStatusBar* sb;
}
// File dialog.h
class CDialogBox : CWindow
{
// Functions
public:
// Vars
private:
// Other vars
protected:
}
I want the members of CDialogBox to have access to the status bar of the CMainFrame, even if the CMainframe is the parent of the parent of the CDialogBox
I don't want to use MFC way or a way like: Constructor(CWindow* parent, ..), or global variables.
If there's no such a way then what of the ways that I mensioned (and I don't like) would be more professional??
Thanks very much On whatever reply!
|
|
|
|
|
Dennis L wrote: I don't want to use MFC way
Is there a reason why ?
Dennis L wrote: what of the ways that I mensioned (and I don't like) would be more professional??
Use MFC. Why reinvent the wheel ?? Create a set of classes for a GUI framework is something very difficult. You will never be able to have something as powerfull as the MFC (or at leat not without spending a LOT of hours of work).
|
|
|
|
|
I have worked on MFC and I think that is a powerful package, but I'd like to create a very simple framework for now to check my abilities and what it would be like to create your own framework! If you please could tell me a way other than MFC I would appreciate it!
Thanks again!
|
|
|
|
|
First, why would a dialog need access to the mainframe's statusbar ?
Second, I think that you need to have a parent window for a child dialog box, me think that win32 needs it ( I'm no expert on win32, so YMMV ).
If your dialog box doesn't have a pointer to the mainframe, you will need to keep a global variable to the mainframe ( either a variable, or a global scope function that returns a pointer to the mainframe )
one other way would be to use some kind of messaging mecanism, either with ::SendMessage/::PostMessage or with a Observer/Observable pattern.
for example ( high level pseudo code )
CDialog::DoSomethingToMainFrameStatusBar()
{
CStatusBar* pStatusBar = YourMainFrameManager::GetStatusbar();
}
CStatusBar* YourMainFrameManager::GetStatusbar()
{
return pMainFrame->getStatusBar();
}
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
|
What are you doing in the OpenReadFile()?
Did you try to check that whether the control is going in the if condition and yes for your information you don't have a loop in the code you posted.
Somethings seem HARD to do, until we know how to do it.
_AnShUmAn_
-- modified at 8:20 Thursday 11th May, 2006
|
|
|
|
|
Anu_Bala wrote: if (fod ==1)
{
BOOL OpenReadFile()
}
I think that it is better:
if (fod ==1)<br />
{<br />
OpenReadFile();<br />
}
|
|
|
|
|
Hi _Russell_
can you say whats question?why these question are hide(2 once)
|
|
|
|
|
I know that usually girls run away from me , but....
Do you know if it could be related with this men's behaviour?
|
|
|
|