|
sir,
please help me out of the problem ... suggesst me the coding to read png image
Attached is the image on which the processing is to be performed
Take this image. It is in .png format.
It has 52 characters written in it.(26 samll a b c d ………z) and 26 capital letters (A B C ………Z)
From this big image we have to segment the image into 52 small images each representing a single character.
Now we have 52 small images. Each of them represents a character.
After this on every image gabor filter is to be applied. Gabor filter is an orientation selective filter. It has some parameters by changing them we can have a set of gabor filters with different parameters.
On each character image 16 gabor filters are to be applied. This way we will have 16 output images for each image.
For all the sixteen images centroid of each image is to be found out. This will have x, y coordinates . find the normalized area of each image. Now every character has 48 components to define it (16 filter images giving 2 coordinates each and area of each output image give 16x2 +16). This can be represented in vector form.
We now have 52 vectors one vector for each image.
To test : given any 48 dimensional vector find the distance of this vector with all 52 vectors. The vector for which difference between given vector and our set of 542 vectors is least wiil be the answer. This means the given vector represents the character “ a” if suppose the difference between given vector and vector for character “a” is found to be the least.
|
|
|
|
|
If you're using C, you're in the wrong forum. There is no such thing as C for .NET, because C is not OO.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hey..
i am using C++ (wxWindows for GUI)--I have an image file in RAW format ...i have read the file into a 2-D array, how that data is to be used display the image on a control?
thanks
|
|
|
|
|
If wxWindows is not a ref (managed) class then you're posting on the wrong board -
you should post on the Visuall C++/MFC board instead.
If this is managed code, you may want to look into the System::Drawing namespace,
Bitmap class for converting your pixel data to a bitmap for drawing.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
hey,
thanks Mark for the reply.. hopefully the idea you gave will solve my problem
|
|
|
|
|
Hello, I’m triying to load and execute managed code using methos as shown belong
<br />
SAFEARRAY * psArr;
SAFEARRAY * Param;<br />
CComPtr <ICorRuntimeHost> spRuntimeHost;<br />
CComPtr <_AppDomain> spAppDomain;<br />
CComPtr <IUnknown> spUnk;<br />
CComPtr <_MethodInfo> MI;<br />
CorBindToRuntimeEx( NULL, L"wks", STARTUP_LOADER_OPTIMIZATION_SINGLE_DOMAIN,<br />
CLSID_CorRuntimeHost ,<br />
IID_ICorRuntimeHost ,<br />
(void**)&spRuntimeHost);<br />
spRuntimeHost->Start();<br />
spRuntimeHost->CurrentDomain (&spUnk);<br />
spUnk->QueryInterface(&spAppDomain.p);<br />
try<br />
{<br />
MI = spAppDomain->Load_3(psArr)->GetEntryPoint();<br />
Param = MI->GetParameters();<br />
MI->Invoke_3 (NULL, Param);<br />
}<br />
catch (_com_error ex)<br />
{<br />
std::wcout<< ex.ErrorMessage();<br />
}<br />
SafeArrayDestroy(psArr);<br />
So if I invoke GUI application all good, but if I invoke Console application Invoke_3() function rise an exceptional situation…
Who has any ideas how to run Console Application?
|
|
|
|
|
Please don't post your question in multiple forums.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Hi there.
I've been experiencing a problem with named pipes server (single
threaded server using i/o overlapped reading/writing). The code
examples of a client and server may be found in Codegear RAd
studio 2007 ("named pipe client" and "named pipes single thread
using overlapped i/o"). The only thing i changed was implementing
a reading handler wich was supposed to store received data into
the Tlist object.
The problem is that if i dont receive data from client outright
after connect i get an ERROR_IO_PENDING pseude error while executing ReadFile function. Subsequently, after having received
that error just once i'm unable to read the info from the pipe
unless to drop the client and try the same again (which results
with the same error).
Have no idea about whether was it planned by example writers to handle this kind of a trouble but nothing seems to be working properly to receive the data which followed that error.
So i'm interested are there any workarounds for that? I mean when i execute ReadFile and it returs ERROR_IO_PENDING error.
In my opinion the most common "reading pipe scenario" would be:
0)Connect to the client
1)Perform ReadFile on the connected pipe;
2)if it returns ERROR_IO_PENDING - wait for the pipe to finish the pending operation (read in this case) by using GetOverlappedResult function (as it implemented in example).
3) perform readfile function again.
The problem is that it can never read the data from the pipe later on even after all the info has been received (GetOverlappedResult returns correct bytes transferred).
As far as it goes i'm deeply stuck into that without seeing any light in the end of the tonnel.
Thanks in advance
Any help would be appreciated.
Andrew.
P.S. code examples located in CodeGear RAD Studion 2007 ("Using Pipes") ms-help://borland.bds5/Ipc/base/using_pipes.htm
-- modified at 7:06 Monday 29th October, 2007
|
|
|
|
|
solved
|
|
|
|
|
There are some errors.
error C2039: 'btowc' : is not a member of '`global namespace'' in cwchar.h
I see some information about gloabal namespace, but i dont understand why
it comes some errors.
Is it because cwchar.h file is obsolete?
If it is, what can I do if I need to use the file?
Can somebody help me to solve the problem?
Thx for ur reply.
Jane.
|
|
|
|
|
The header file "cwchar.h" puts btowc into the std namespace:
namesapce std {
using ::btowc;
...
}
Thus, you will have to prefix btowc with std , std::btowc , or place this in your code:
using std::btowc
or this:
using namespace std;
before using btowc .
In the future, please ask C++ related questions in the Visual C++ / MFC forum.
-- modified at 14:38 Tuesday 30th October, 2007
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
|
My Requirement is to create a web application in which a TAB Control is placed in it.
In each tab same controls are to be placed. for this i created a webuser control and accessed the same in each tab.
I have placed some controls like radiobutton list, textboxes, dropdowns fro selection criteria in the web user control.
I have created a class and wrote some properties , serialize and deserialize methods to store the values selected from each tab and save to a disk file.
The question is that in one tab whatever i have selected and saved to the file it is coming in all tabs. I dont want this to happen.
it must come in one tab only, as i want to save different selection for different tabs.
So How can i do this?
Please help me out if u have any solutions by which this prob can be solved.
chandra
|
|
|
|
|
This can be better answered in the ASP.NET forum.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
i nedd boyer-moore alogritim for seraching hex values source code in c++ if any body have please share.
|
|
|
|
|
"Be specific! Don't ask "can someone send me the code to create an application that does 'X'. Pinpoint exactly what it is you need help with." --Maunder
Also, this is not the C++ forum.
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
Hi I have a requirement like i have to place a scrollbar for the treeview control in order not to increase the height of the page/control.
i have set the property of treeview control(ImageSet="Arrows").
childnodes are nearly 200.so whenever i click that image control is expanding and the page size is increasing.
Instead of that can i place a scroll bar so that the control can extend upto some level in order to avoid the page size getting increased.
So i request u to solve this problem if u have any solution.
chandra
|
|
|
|
|
I want to compile a program.I compile the files with /TP.
I originally use /CLR option, but it says that a .c file cant work with /clr.
I see the page.
http://msdn2.microsoft.com/en-us/library/ms173265(VS.80).aspx
so, I change it to no /CLR. Then it comes out other problems.
1. syntax error '__value'
2. error C4980: '__value' : use of this keyword requires /clr:oldSyntax command line option
But I change it to /clr:oldSyntax,
I comes the error that error D8045 : cannot compile C file '.\gsm\RPE.C' with the /clr option again.
How can I debug this error?
Appreciate for ur reply.
Jane
-- modified at 3:01 Monday 29th October, 2007
|
|
|
|
|
Hello All,
Is there a (free) GUI builder out there for C++ that doesn't used the .NET framework? I
want to learn that basics of GUIs with C++ but i can't find anything other than .NET related
information.
Is it even possible to write non-platform specific GUI programs?
Thanks
|
|
|
|
|
Ylno wrote: Is there a (free) GUI builder out there for C++ that doesn't used the .NET framework?
Then it is not a great idea to ask this in the Managed C++ forum.
Try the unmanaged C++ forum instead.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi Luc,
I seem to always get this wrong. What's the difference? I don't understand the difference between the different types?
I've just been learning C++ with a text editor and a command line compiler so does that mean i'm using managed or unmanaged?
Does managed mean that you're using stuff from the .NET framework or a similar framework.
Thanks anyway for pointing me in the right direction
|
|
|
|
|
Hi,
yeah, the forum structure (and their names) may confuse you:
the regular C++ language, the only C++ Visual Studio supported up to version 6,
and still supported by newer VS versions, is handled in the "Visual C++/MFC" forum.
This seems the one you need this time.
the extended C++ language that runs on top of the .NET Framework and uses all the
nice .NET classes, is handled in this, the "(Managed) C++/CLI", forum. It requires
Visual Studio 7 or better.
C# is always managed, and has its own forum.
old VB and new VB.NET are both handled in the one "Visual Basic/VB.NET" forum.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
|
Either the user running your application needs to be given permission on the shared folder, or you would have to impersonate a user who does have permission. This[^] article describes impersonation in C++.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
Hi, I'm using Visual Studio 2005 C++/CLI. I have a double value of 4.000000000000000 that I subtract 0.2 from leaving 3.7999999999999998. I want to round this to 3.8 so I use 'double rounded_value = System::Math::Round(value_to_round, 2)' where the resulting value is exacly the same at 3.7999999999999998. In the next iteration I subtract 0.2 from the rounded value of 3.7999999999999998 leaving 3.5999999999999996. Then the Round() function results in 3.6000000000000001. After subtracting 0.2 from this I get 3.3999999999999995 and the Round() function results in 3.3999999999999999. If I use the Round() function to round to an integer it works fine, but this rounding to 2 significant digits is not working. Anyone know why?
Thanks
Buck
|
|
|
|