Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 months ago.
Improve this question
I was wondering if there is some sort of resource where I can find all the functions present in OpenCV and their declarations; without much theory of any sort. The problem with the OpenCV guide is that there is too much theory that is involved, and I wish to have a reference that can help me, find the function as and when I want them, something like a function index? I could try the header cpp files or something. I was wondering if there is some sort of online resource already present to that end?
I would highly recommend the C++ interface if you are using OpenCV 2.0, as opposed to the C documentation presented in the other answer.
Have you seen this OpenCV index? (appears broken now)
Updated: w/ different link to docs:
I recommend OpenCV C(or C++) reference. The latest version is OpenCV 2.2. You should check it carefully if you come from former versions as this version includes many new features as such as Android app. Moreover, the header files, functions and .lib file are re-organized in a more specific way.
The following post is exclusively for Python users.
1. Listing all OpenCV functions
To get the entire list of OpenCV's functions use dir(cv2):
import cv2
# all cv2 functions in a list
functions_list = dir(cv2)
# display first 20 functions
functions_list[:20]
>>>['', 'ACCESS_FAST', 'ACCESS_MASK', 'ACCESS_READ', 'ACCESS_RW', 'ACCESS_WRITE', 'ADAPTIVE_THRESH_GAUSSIAN_C', 'ADAPTIVE_THRESH_MEAN_C', 'AGAST_FEATURE_DETECTOR_AGAST_5_8', 'AGAST_FEATURE_DETECTOR_AGAST_7_12D', 'AGAST_FEATURE_DETECTOR_AGAST_7_12S', 'AGAST_FEATURE_DETECTOR_NONMAX_SUPPRESSION', 'AGAST_FEATURE_DETECTOR_OAST_9_16', 'AGAST_FEATURE_DETECTOR_THRESHOLD', 'AKAZE', 'AKAZE_DESCRIPTOR_KAZE', 'AKAZE_DESCRIPTOR_KAZE_UPRIGHT', 'AKAZE_DESCRIPTOR_MLDB', 'AKAZE_DESCRIPTOR_MLDB_UPRIGHT', 'AKAZE_create']
2. Searching for a particular function in OpenCV
What if you want to look up for a function but don't remember it clearly? Or you can only recall the function partially?
For instance, there are many functions to smooth an image, but you are unable to recall which one you want specifically. Using the following, you can get a list of all the functions available in cv2 with the a keyword.
In the following scenario we are searching for functions containing the word blur:
def search_function(name):
match_list = []
for function in dir(cv2):
if name in str.lower(function):
match_list.append(function)
return match_list
search_function('blur')
The above returns the following list:
['GaussianBlur', 'blur', 'medianBlur']
Now just append cv2. before the function of your choice and proceed.
The top two are actually referring to the OLD OpenCV (2.0) documentation. The new documentation is hosted somewhere else, here: http://opencv.itseez.com/index.html . At itseez. Its the current version >2.4. Previous answers are outdated.
Latest updates can be found through:
http://opencv.org/
From there, the documentation meta-site:
http://docs.opencv.org/
Related
This question already has an answer here:
Alignment problem with ieeetran website citation
(1 answer)
Closed 6 months ago.
I have this bib item and I am using IEEEtran as a bibliographystyle. I have used the default IEEEtran.bst and IEEEtran.cls. I am not sure, if I need both but I have tried all variations.
#misc{clark_2022,
title={Tiktok faces investigation into its impact on Young People's Mental Health}, url={https://www.theverge.com/2022/3/2/22958900/tiktok-state-ag-investigation-teens-kids-mental-physical-health},
journal={The Verge},
publisher={The Verge},
author={Clark, Mitchell},
year={2022},
month={Mar}
}
The reference now looks like this:
What is causing it and how do I change it? Is this part of IEEEtran?
I had a similar issue with IEEEtran, and adding the xurl package seemed to completely fix it.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 1 year ago.
Improve this question
I like rubocop and its integration with Rails and normally honour its suggestions all the time, I can say the same about Ruby and Rails conventions it is based on.
However I really disagree with the convention below as I find it really counter-productive.
agent_recorded_date = MonitorLog.joins(:connected_monitor).
where('connected_monitors.id = ? AND detail = ?', replacement.replaced_monitor_id, 'Monitor event - Replace monitor error').
first&.timestamp
This is going to be frowned by Rubocop and it is indeed not what the convention is. The way the convention goes is this:
agent_recorded_date = MonitorLog.joins(:connected_monitor)
.where('connected_monitors.id = ? AND detail = ?', replacement.replaced_monitor_id, 'Monitor event - Replace monitor error')
.first&.timestamp
Note the place where the dots are to break the query into multiple lines to comply with coding guidelines... The first option above will cause Rubocop warning called dot position offence .
Now, imagine we want to debug this query or quickly test it in the Rails console / IRB and what we will see?
If you copy and paste the recommended way (first option above) into console it will throw en error. The second will work because if you end a line with a period IRB will assume it is a multi-line command and that will succeed.
So this is where I really disagree with Rubocop and would like to know the benefits of following the convention here and whether there is a better way of copy and paste multiline commands from IDE into rails console to test them quickly (and in case of our company it is not only a professional dev but QA people also who may need to run a specific query in a console).
The very latest irb (1.3.5) supports copy-pasting multiple lines
If you can't upgrade yet, there is an easy way to paste a multi-line expression in irb: type an opening (, paste your code, then ).
Do not sacrifice your code for the sake of a tool's limitation. Fix the tool instead. If you still want to go against this convention, you can configure RuboCop to use EnforcedStyle: trailing instead.
You can change rubocop's configuration using a .rubocop.yml configuration file. See https://docs.rubocop.org/rubocop/configuration.html
In this case, you want to change (or set) EnforcedStyle: trailing
Could someone provide a simple example using getopt.pas with short and long command line switches use case?
Getopt.pas is a delphi unit for parsing command line switches.
I've found more than one version of it.
from fpc http://www.koders.com/delphi/fid428067C2ABEF87A674F64BF48FD6E2278E322A18.aspx
The following is another SO question regarding this subject but no example is given; beside it this links to a source that alike the previous links is not self-contained
Is there an implementation of "getopt" for Delphi?
Here is a demo of the GPC code that you link to: getoptdemo.pas [koders.com]
For fun, I would like to implement something that takes an arbitrary string as input and returns a random image that is seeded from the string. It doesn't have to be super robust or anything. I'd love to be able to make something like the unicorn/pony gravatars that SO had a while ago.
If Gravatar were open source and had a plugin architecture for implementing new image types, I'd like to build one. But I wasn't able to find that.
I would like to use Python or Java if possible.
You could look at the code that Stack Overflow itself uses for the unicorns: https://web.archive.org/web/20110224234102/http://unicornify.appspot.com/
As mentioned by the title, I would like to find an implementation for HMAC-SHA-512 written for ActionScript. I was able to find a library that provide HMAC-SHA-256 with other functions, however, I am looking for HMAC-SHA-512 specifically.
Thank you
Edit:
Or, since actionscript and javascript have the same origin, can some one port this javascript version into actionscript?
http://pajhome.org.uk/crypt/md5/sha512.html
Edit 2:
I already ported the code from javascript to actionscript. The code can be found in one of the answers in this question
Porting SHA-512 Javascript implementation to Actionscript
Checkout this library:
http://code.google.com/p/as3crypto/
Though only does:
SHA-256,SHA-224,SHA-1,MD5, and MD2
So I guess that doesn't answer your question.
But best Crypto library for actionscript I've seen.
The implementation you link to doesn't seem to be using any features that aren't supported by ActionScript 3. Just surround the whole thing with public class SHA512 { }, and prefix the first five functions with public.
Edit: You will also need to convert function int64 to it's own class (or possibly use Number, though I'm not sure if you will lose precision for 64-bit integers).
Just found all of SHA-2 (SHA-224, SHA-256, SHA-384, SHA-512) implemented at http://code.google.com/p/flame/. Also it provides HMAC implementation. Didn't try it yet but looks what you're looking for.