Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.

Error on LocalBinaryPattern public object clone() #438

Closed
blaisexen opened this issue Feb 19, 2017 · 6 comments
Closed

Error on LocalBinaryPattern public object clone() #438

blaisexen opened this issue Feb 19, 2017 · 6 comments

Comments

@blaisexen
Copy link

my solution was to comment 3 lines:

        public object Clone()
        {
            var clone = new LocalBinaryPattern(blockSize, cellSize, normalize);
            //clone.epsilon = epsilon;
            //clone.histograms = (int[,][])histograms.Clone(); //**ERROR HERE**
            //clone.patterns = (int[,])patterns.Clone(); //**ERROR HERE**
            return clone;
        }
@cesarsouza
Copy link
Member

Thanks for opening the issue! Probably histograms and patterns were null during the cloning. I will add a fix in the following minutes.

@blaisexen
Copy link
Author

Oh, it is really an issue, I'll wait for that in this lines,
thank you

@blaisexen
Copy link
Author

but the code I used is this:

                var binarySplit = new BinarySplit(numberOfWords);
                var freak = new LocalBinaryPattern();
                var freakBow = new BagOfVisualWords<FeatureDescriptor>(freak, binarySplit);

maybe it doesn't affect

@cesarsouza
Copy link
Member

cesarsouza commented Feb 19, 2017

Your fix is fine in this situation. It will work fine with BagOfVisualWords (it will give the correct results).

@blaisexen
Copy link
Author

issue closed, and maybe fixed for next update released.
thank you

cesarsouza added a commit that referenced this issue Feb 19, 2017
GH-365: Updating LBP to work with BoW;
@cesarsouza
Copy link
Member

Fixed in 3.5.0.

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

No branches or pull requests

2 participants