Revert "Fixed split not working"

This reverts commit bc9be2f1086ecb5e9227e6cac846041d26b2e3eb.
This commit is contained in:
Oskar Dahlberg 2014-09-22 23:35:34 +02:00
parent bc9be2f108
commit 20efb8313b

View File

@ -1691,16 +1691,9 @@ Matrix::Split(const v8::Arguments& args) {
Matrix * self = ObjectWrap::Unwrap<Matrix>(args.This());
unsigned int size = self->mat.channels();
vector<cv::Mat> channels;
// Split doesn't seem to work on empty vectors
for (int i = 0; i < size; i++) {
channels.push_back(cv::Mat());
}
cv::split(self->mat, channels);
unsigned int size = channels.size();
v8::Local<v8::Array> arrChannels = v8::Array::New(size);
for (unsigned int i = 0; i < size; i++) {
Local<Object> matObject = Matrix::constructor->GetFunction()->NewInstance();
@ -1712,6 +1705,7 @@ Matrix::Split(const v8::Arguments& args) {
return scope.Close(arrChannels);
}
// @author SergeMv
// img.merge(arrChannels);
Handle<Value>