x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

OpenCV compatible definition of int64

Unreal engine defines the global types int64 and uint64, which are signed long long and unsigned long long respectively.

So asides from the perplexing comment in the API documentation ("32-bit signed"??) this causes problems when linking more intimately with openCV, as that library also defines int64 and uint64, but as int64_t and uint64_t. These are sometimes long long, and sometimes long, depending on your platform, but they are always 64 bits.

Is it possible for you to change your definitions to the stdint ones, or can you give me a strong enough argument that long long is better so I can bring that to the opencv guys instead?

(my current solution is terrible and involved renaming the unreal definiton as I didn't want to risk producing hidden bugs due to things not being the same size)

thanks

Product Version: UE 4.14
Tags:
more ▼

asked Nov 30 '16 at 05:08 PM in C++ Programming

avatar image

thesilencelies
48 2 6 9

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

I had the same problem.

I don't know if my approach was the best but I have changed OpenCV directly instead of Unreal

I had to change "opencv2/core/types_c.h"

I changed the code below:

 #else
    typedef int64_t int64;
    typedef uint64_t uint64;
 #  define CV_BIG_INT(n)   n##LL
 #  define CV_BIG_UINT(n)  n##ULL
 #endif

By the the following code:

 #else
     typedef long long int64;
     typedef unsigned long long uint64;
 #  define CV_BIG_INT(n)   n##LL
 #  define CV_BIG_UINT(n)  n##ULL
 #endif

No Unreal and OpenCV works.

more ▼

answered Jan 19 '18 at 04:50 PM

avatar image

Ruben Alves
20 5 10 13

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question