|
elelont2 wrote: Please advise.
Use Google[^].
|
|
|
|
|
I have been using google, thats why its vague to me.
|
|
|
|
|
The first link in the Google page I found for you gives quite a clear definition.
|
|
|
|
|
Hello All
I am using this code to calculate Image Integral
This code is working properly.
(I am working under Ubuntu with code::block)
but I want to change this, for calculate Image integral in parallel.
can you help me ?
///////////////////////////////////////////
// name : IntegralImage.c
// programme squentiel
// for display with opencv
///////////////////////////////////////////
#include <stdlib.h>
#include <stdio.h>
#include "opencv/highgui.h"
#define IMAGE_WIDTH 384
#define IMAGE_HEIGHT 286
#define S (IMAGE_WIDTH/8)
#define T (0.15f)
void adaptiveThreshold(unsigned char* input, unsigned char* bin)
{
unsigned long* integralImg = 0;
int i, j;
long sum=0;
int count=0;
int index;
int x1, y1, x2, y2;
int s2 = S/2;
// ============ integral image ================
integralImg = (unsigned long*)malloc(IMAGE_WIDTH*IMAGE_HEIGHT*sizeof(unsigned long*));
for (i=0; i<image_width; i++)
="" {
="" =="====reset" this="" column="" sum="====
" for="" (j="0;" j<image_height;="" j++)
="" index="j*IMAGE_WIDTH+i;
" +="input[index];
" if="" (i="=0)
" integralimg[index]="sum;
" else
="" sum;
="" }
="" }
="" thresholding="===============
" i<image_width;="" seting="" region="" sxs="==========
" x1="i-s2;" x2="i+s2;
" y1="j-s2;" y2="j+s2;
" ckeck="" border="=========
" (x1="" <="" 0)="" (x2="">= IMAGE_WIDTH) x2 = IMAGE_WIDTH-1;
if (y1 < 0) y1 = 0;
if (y2 >= IMAGE_HEIGHT) y2 = IMAGE_HEIGHT-1;
count = (x2-x1)*(y2-y1);
// ===== I(x,y)=s(x2,y2)-s(x1,y2)-s(x2,y1)+s(x1,x1) ===
sum = integralImg[y2*IMAGE_WIDTH+x2] -
integralImg[y1*IMAGE_WIDTH+x2] -
integralImg[y2*IMAGE_WIDTH+x1] +
integralImg[y1*IMAGE_WIDTH+x1];
if ((long)(input[index]*count) < (long)(sum*(1.0-T)))
bin[index] = 0;
else
bin[index] = 255;
}
}
free (integralImg);
}
//////...test avec opencv...
int main (int argc, char** argv)
{
IplImage* cvFrame;
IplImage* binImg;
int key;
cvFrame = cvLoadImage("b.bmp", -1);
binImg = cvCreateImage(cvSize(IMAGE_WIDTH, IMAGE_HEIGHT), 8, 1);
cvNamedWindow("Input", 1);
cvNamedWindow("Output", 1);
adaptiveThreshold((unsigned char*)cvFrame->imageData, (unsigned char*)binImg->imageData);
cvShowImage("Input", cvFrame);
cvShowImage("Output", binImg);
key = cvWaitKey(0);
return 0;
}
|
|
|
|
|
Hi,
heading says it all, how could i find out the total length of the string in the ##__VA_ARGS__
Thanks
|
|
|
|
|
elelont2 wrote: heading says it all, how could i find out the total length of the string in the ##__VA_ARGS__
Subject says "elements". Your statement says "string".
For a string you use null termination or the string length property (depending on what you mean by string.)
In standard C++ if you want to know a count of arguments passed then you need to provide a mechanism for doing that yourself. Just like if your printf format string doesn't match the args passed then it will go off the end. Thus the format string implicitly defines the count.
Not sure but in Managed C++ it might be an actual array so you should be able to get to the Length property.
|
|
|
|
|
I'm a student.I want to use a calendar in my application. It may looks like iCal of MacOsX. Can someone give me the dll? thanks~
|
|
|
|
|
where the mother is the original source code, or the full source code ....
|
|
|
|
|
how to convert a managed object referance into void pointer?
|
|
|
|
|
|
Hi,
Can anyone please help me fix the issue of video display hanging on Windows? The issue occurs after both manual and automatic locking of Windows. When I unlock, the video display hangs, but sound is heard and video packets are sent and recieved properly(confirmed from wireshark)
Code works completely fine on Linux.
Thanks in advance,
Faez
|
|
|
|
|
... of this question[^]. Please post in one forum only, particularly as you have not explained what this has to do with C++/CLI.
Programming is work, it isn't finger painting. Luc Pattyn
|
|
|
|
|
|
Sorry, there's just not enough to work with here. We cannot even formulate a guess without seeing some code. Are you able to repro the problem in a very small test application?
|
|
|
|
|
Faez Shingeri wrote: an anyone please help me fix the issue of video display hanging on Windows?
A "video display" is a piece of hardware. It doesn't "hang". Applications on the other hand do.
Given that you are using C++ and windows and linux, it is obvious that you must explain in greater detail exactly what your application does and exactly how it does user input.
|
|
|
|
|
HI,
is it possible to find a pointer from a list of pointers?
I know i can do it with find_if and a predicate, but since pointers are just addresses it should probably be possible to search them as if they were integers, with "find" function.
|
|
|
|
|
You are correct, you can test pointers for equality so a simple compare will do the job.
Binding 100,000 items to a list box can be just silly regardless of what pattern you are following. Jeremy Likness
|
|
|
|
|
Hi !
You can browse from head to tail of list.
|
|
|
|
|
<code><code><code></code></code>
We have developed our project with the following technologies Visual
C#, Visual C++ and C Language. When we tried to execute our project in
client machine, It works only if the system has Visual C++ installed.
Otherwise it throws an Unhandled exception.The Visual C++ program
which we have developed is dependent on 4 native DLL such as
mscorlib.dll, microsoft visual c.dll, system.dll and data.dll. Visual
C++ project does not load the above mentioned assemblies during run
time.
So we kindly request you to provide some inputs on this to proceed further.</code>
|
|
|
|
|
Unless you have built your C++/C code using statically linked libraries, you will need to install the Visual C++ runtime. As you haven't stated which version of C++ you are developing with, I can't point you to the correct one. If you Google for Visual C++ runtime [version] then that should find the one you want (replace [version] with the particular Visual C++ you used).
|
|
|
|
|
If you don't know exactly what are all the dependencies that you need for your executable to run a client machine, use Dependency Walker[^] to help you determine what you're missing. Usually, MS will also provide an executable to package/distribute their distributable dll's.
|
|
|
|
|
Hi thanks for your reply...
When the dependency walker has been installed the visual c++ is missing these dll.
MSVCM90D.DLL,MSVCR90D.DLL,IESHIMS.DLL,WER.DLL
Got error as
Error: The Side-by-Side configuration information for "c:\documents and settings\administrator\my documents\givi\learning materials\acadamic_project\openpowerlinkdemoappv1.8(final)\openpowerlinkdemoappv1.8(final)\openpowerlinkdemoappv1.8\release\OPENPOWERLINK.NET.DLL" contains errors. This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem (14001).
Error: At least one required implicit or forwarded dependency was not found.
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
How to make this dll to be accessed by visual c++ project?
|
|
|
|
|
It seems that you are trying to deploy a debug build on a non Visual studio client.
You cannot do it. The c run-time is release only.
|
|
|
|
|
Hi,
I want to compare the unicode strings of NVarchar Fields.... Is it possible...?
But when I check in English Laguage string....simply its working fine...
But when I check with Arabic and English datas...its not working well..
Thanks for guidences...
My Codes...
ChkItm1 = String::Empty;
String^ ChkItm1=String::Empty;
String^ KyPrs1=String::Empty;
ChkItm1 = MyGlobalData::PartyTbl->Rows[N7]["supplier_name"]->ToString();
if 'N'???????? (ChkItm1->Trim()->Substring(0, MyGlobalData::KyPrs1->Trim()->Length)=='N'????????
MyGlobalData::KyPrs1->Trim()) {
blah...blah...blah...
}
|
|
|
|
|
It seems like you'd want a Culture-Invariant comparison.
Something like this?
bool ignoreCase = true; // you may want false
if (String::Compare("xxxxxx", ChkIt1->Trim()->etc..., ignoreCase, CultureInfo::InvariantCulture) == 0)
// a match!
else
// not a match
John
|
|
|
|