Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VS2017 compile errors resolved #16

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

mshafiei
Copy link

@mshafiei mshafiei commented Jun 7, 2018

Hi,

I resolved compile time errors on windows. fbow_create_voc_step0.exe works fine.
But when I run fbow_create_voc_step1.exe I get a segmentation fault right after the following print,

DescName=orb
Creating a 10^6 vocabulary...

any idea why that happens?

Configs of my machine:
Windows 10, Visual studio 2017, Opencv 3.4

@mshafiei
Copy link
Author

mshafiei commented Jun 7, 2018

Actually I resolved the seg fault in the last commit. It runs on Windows now. Didn't check it on linux yet

@tmako123
Copy link

tmako123 commented Jun 7, 2018

I think you also have to modify destructor.

//fbow.h

~Lx(){ 
	if (feature != 0){
#if WIN32
		_aligned_free(feature);
#else
		free(feature);
#endif
	}
}

// fbow.cpp

Vocabulary::~Vocabulary(){
	if (_data != 0) {
#if WIN32
		_aligned_free(_data);
#else
		free(_data);
#endif
	}
}

@rmsalinas
Copy link
Owner

rmsalinas commented Jun 7, 2018 via email

@mshafiei
Copy link
Author

mshafiei commented Jun 7, 2018

Sure. It's the der hass dataset. But you should no longer face the seg fault if you check out the latest commit

@mshafiei
Copy link
Author

mshafiei commented Jun 8, 2018

For me, seg fault does not happen anymore in debug mode. But it is strange that in release mode it crashes.

@mshafiei
Copy link
Author

mshafiei commented Jun 8, 2018

The seg fault that I mentioned in last post was due to the existing destructors. I added @tmako123 's functions and the issues are now resolved.
I added few files (imagematching.py and .cpp) where transform function is called. Now there is an error raised from that function.
These files could be used by running the cmake again and compiling the code. Then .py file takes the address of a dataset and tries to match each image in the dataset with the rest.

@mshafiei
Copy link
Author

mshafiei commented Jun 10, 2018

The transform function crashes for ORB feature type but works for SURF and AKAZE.
On the other hand, the score function returns score 1.0 for SURF and AKAZE feature types regardless of the actual similarity of the input images.

@mshafiei
Copy link
Author

So the problem is with the io functions. I resolved the io between step0 and step1. Where the features vector is stored in a binary file. Instead I write it on a YML file.
There is still another step where vocabulary is written in a file and loaded that I have not fixed. But if you create the vocabulary and use it in one single program then there is no issue. Like what you see in image_matching.cpp file. So running step0 before image_matching.cpp runs with no error on windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants