Coder Social home page Coder Social logo

Comments (3)

gidesa avatar gidesa commented on September 4, 2024

Hello,
the first warning on mt is clearly ininfluent.
With my compiler (32bit) there is no warning on signed/unsigned.
The others warnings complain from some unitialized variables, but they are always initialized, in instructions sequence out of conditionals, and then always executed. So compiler is too much restrictive.
For example: vecBoxes initialized in vecBoxes:=pCvVectorRect2dCreate(detections.Count);
vecNmsIndex in vecNmsIndex:=pCvVectorintCreate(0);
and so on.

from ocvwrapper46.

hafedh-trimeche avatar hafedh-trimeche commented on September 4, 2024

Hi,

vecNmsIndex must be defined outside Try Finally block because if an exception is raised, vecNmsIndex has no value and would generate another exception when calling pCvVectorintDelete(vecNmsIndex);

dptr := dptr + outW*SizeOf(single);
Change to
dptr := dptr + UInt64(outW)*SizeOf(single);

 Assert((nchannels=1) or (nchannels=3),'Channels number must be 1, 2 or 3');
 case nchannels of
  1:  mt:=CV_8UC1;
  2:  mt:=CV_8UC2;
  3:  mt:=CV_8UC3;
 end;

Change to

  Assert((nchannels>=1) and (nchannels<=3),'Channels number must be 1, 2 or 3');
  mt:=CV_8UC1;
  case nchannels of
   2:  mt:=CV_8UC2;
   3:  mt:=CV_8UC3;
  end;

vecBoxes, classIdPoint and vecScores same as vecNmsIndex

img must be set to nil before the Try Finally Block.

Best regards.

from ocvwrapper46.

gidesa avatar gidesa commented on September 4, 2024

Hello, regarding your good advise to reorganize try ... finally blocks, I released the corrected version of unOpencvDelphi46.pas.
Regards

from ocvwrapper46.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.