如何匹配图像中的纹理相似性?(How to match texture similarity in images?)
量化图像一部分纹理的方法有哪些? 我试图在图像中检测纹理相似的区域,这是“它们有多近似?”的一种度量。
所以问题是关于图像的哪些信息(边缘,像素值,渐变等)可以被视为包含其纹理信息。
请注意,这不是基于模板匹配。
维基百科没有给出有关实际执行任何纹理分析的细节。
What are the ways in which to quantify the texture of a portion of an image? I'm trying to detect areas that are similar in texture in an image, sort of a measure of "how closely similar are they?"
So the question is what information about the image (edge, pixel value, gradient etc.) can be taken as containing its texture information.
Please note that this is not based on template matching.
Wikipedia didn't give much details on actually implementing any of the texture analyses.
原文:https://stackoverflow.com/questions/6088372
最满意答案
相关问答
更多-
期望一个赋值或函数调用,而是看到一个表达式(Expected an assignment or function call and instead saw an expression)[2022-02-25]
我不认为JSLint可以选择关闭此功能。 JSHint (具有更多选项的分支)有一个选项,但是: expr选项记录为“如果ExpressionStatement应该被允许作为程序”。 I don't think JSLint has an option to turn that off. JSHint (a fork with more options) has an option for it, though: The expr option, documented as "if ExpressionSt ... -
警告预期分配或函数调用,而是看到一个表达式(warning Expected an assignment or function call and instead saw an expression)[2023-12-18]
因为三元运算符在条件的基础上返回值,并且您使用三元运算符来更新状态,这就是原因。 condition ? expr1 : expr2; 三元运算符执行表达式[ 期望应该导致某些值的表达式,可以是函数调用或直接任何值 ]并返回该表达式的结果。 使用if条件而不是三元运算符,如下所示: if(this.state.selectedJobType.length) this.setState({ jobTypeErrMsg: 'Please select at least one job type'}) ... -
这是不言自明的。 || 运算符生成表达式,而不是语句(赋值)或函数调用。 如果您将其作为作业,您的代码应该有效: iterator = iterator || _.identity; It's quite self-explanatory. The || operator produces an expression, not a statement (assignment) or function call. Your code should work if you make it an assignm ...
-
问题是你的最后一个else语句,应该没有条件表达式: else (total2 >= 17 && total2 < 21); { ANSWER = 'stop'; } 应该写成: else if(total2 >= 17 && total2 < 21){ ANSWER = 'stop'; } 要么: else{ ANSWER = 'stop'; } 取决于你想要什么。 The problem is your last else statement, there should b ...
-
错误 - 期望分配或函数调用,而是看到一个表达式(Error - Expected an assignment or function call and instead saw an expression)[2022-04-04]
将条件放在if块中: if (rangeStop >=a3) f += a3+","; if (a3==rangeStop) f += a3; 此外, for块缺少花括号,缩进是模糊的,所以我不确定你想要/期望什么。 最好添加它们。 Put the condition in an if block: if (rangeStop >=a3) f += a3+","; if (a3==rangeStop) f += a3; Also, the for block is missing curly ... -
JShint:期望一个赋值或函数调用,而是看到一个表达式(JShint :Expected an assignment or function call and instead saw an expression)[2023-04-21]
如果您按预期编码工作,但您认为jshint过于“严格”或者对该行代码表现不佳,则可以使用以下注释忽略jshint中的警告: $scope.campaingstartDate; // jshint ignore:line 或者,您可以按照此页面上的建议指定默认值。 $scope.campaingstartDate = ''; // add any value as default for your property here If you code work as expected but you th ... -
解决方案1 使用if语句而不是&&运算符(这是我要做的): if (typeof(onloadedcompleted) == 'function') { onloadedcompleted(NUM_ELEMENTS, NUM_LOADED, NUM_ERROR); } 解决方案2 在JSHint选项中,设置expr: true 有关详细信息,请参阅此处: http : //jshint.com/docs/options/#expr 解决方案3 告诉JSHint忽略该行: typeof(onload ...
-
你不需要{和} ,它应该工作。 You don't need the { and }, it should work then.
-
它正在这样做,因为它警告你在你不仅仅是分配的上下文中使用=而不是==或=== ,而且还使用指定的结果做某事。 这是完全有效的JavaScript,但它经常是无意的。 一个更好的例子是: if (foo = bar) { // ... } ...你可能意味着==或=== (检查它们是否相等)。 你如何解决它取决于你想要做什么。 从方法的名称,我假设你(好吧,他们)试图设置task.completed ,在这种情况下坦率地filter是错误的功能使用; 他们应该使用forEach : complete ...
-
JSHint希望您使用单独的语句(以分号结尾),但您使用的是单个语句,每个表达式都使用逗号运算符分隔。 这也允许您从函数表达式中解开for循环。 function flag(land, position) { this.pos = position; this.link = land; this.hideFlag = function () { position.innerHTML = ' '; }; position.addEventListener ...