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

Basic Video Support #74

Merged
merged 4 commits into from
Jan 30, 2019
Merged

Basic Video Support #74

merged 4 commits into from
Jan 30, 2019

Conversation

luisremis
Copy link
Contributor

Add basic support for video. Updates Image formats definitions.

Copy link
Contributor

@vishakha041 vishakha041 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some code cleanup, wiki consistency and commit fixing is needed before this can go out.

@@ -103,21 +103,21 @@ int AddImage::construct_protobuf(PMGDQuery& query,
}

std::string img_root = _storage_tdb;
VCL::ImageFormat vcl_format = VCL::TDB;
VCL::Image::Format vcl_format = VCL::Image::Format::TDB;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this file could totally use a
using namespace VCL; IT appears often enough to avoid doing VCL:: everywhere

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. For now we just update the changes in the enums. We can change namespacing in a future refactor, I already have some other things in mind that we can do better.

tests/python/TestImages.py Show resolved Hide resolved
src/BoundingBoxCommand.cc Show resolved Hide resolved
SConstruct Show resolved Hide resolved
@@ -243,7 +253,15 @@ void QueryHandler::cleanup_query(const std::vector<std::string>& images)
{
for (auto& img_path : images) {
VCL::Image img(img_path);
img.delete_image();
img.delete_image(); // TODO this should be common
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Common to what? And if it should be, maybe just do it?

utils/SConscript Show resolved Hide resolved
results["list"].append(VDMS_VID_PATH_PROP);
}

std::cout << "hello" << std::endl;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gosh, not sure how it got there. It will make people think I don't use gdb (which I don't).

ifile.seekg(0, std::ios::end);
size_t encoded_size = (long)ifile.tellg();
ifile.seekg(0, std::ios::beg);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this equivalent to asking VCL to read video? Seems like code repeat somehow

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not the same. VCL will run decoding when reading, and in this case we don't need that, we just want the blob to be sent without any decoding. The same is true for images, an inefficiency we , but it is least critical(I think there is an issue already, if not, it's been in my mind for some time already). Decoding video is much more compute intensive.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case I would have added a function to VCL to allow the same thing so all data manipulation stayed in one library as much as possible but too late I support. FIle an issue?

@@ -452,8 +521,8 @@
"properties": {
"_ref": { "$ref": "#/definitions/refInt" },
"link": { "$ref": "#/definitions/blockLink" },
"operations": { "$ref": "#/definitions/blockOperations" },
"format": { "$ref": "#/definitions/formatString" },
"operations": { "$ref": "#/definitions/blockImageOperations" },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't these changes part of the previous commit? It probably breaks some test in the previous commit.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, this is a result of adding video that we have to split operations block in two.

props = {}
props["name"] = "simg_update_0"

img_params = {}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need me to review tests? I am hoping you have put checks and balances here to make sure videos get stored and rertieved correctly without losing out data :)

Copy link
Contributor

@vishakha041 vishakha041 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't forget to add pending issues and wiki pages.

@luisremis luisremis merged commit f4c1810 into develop Jan 30, 2019
@luisremis luisremis deleted the lr/feature_video branch May 3, 2019 23:16
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.

2 participants