# Revision history [back]

### How to remove multiple hits on detection?

Normaly houghtransfer uses mindistance between 2 circle centers but this does not work. included is my code and one of my lab results. I use multiple morphological steps to enhance the result.

My code:

# -- coding: utf-8 --

""" Created on Mon Mar 2 14:22:03 2020

@author: Fabio Mirisola """

import numpy as np
import cv2 as cv
from skimage import morphology

# Import image

# Import background

# Subtracting background from data
cv_subt = cv.subtract(data,background)

# Cropping the image
Xcoord = 350
YCoord = 250
Width = 1330
Height = 1330
crop_img = cv_subt[YCoord:YCoord+Height, Xcoord:Xcoord+Width]
ret,thresh = cv.threshold(crop_img,25,255, cv.THRESH_BINARY)

# Removing small pixels
thresh_bool = thresh.astype('bool')
cleaned = morphology.remove_small_objects(thresh_bool, min_size=70, connectivity=5)
im_bin = cleaned.astype('uint8')
image = (im_bin)*255

# Inversing the image
ret,inverse = cv.threshold(image,5,255, cv.THRESH_BINARY_INV)

# Opening the holes
kernel = cv.getStructuringElement(shape=cv.MORPH_RECT, ksize=(4,4))
opening = cv.morphologyEx(inverse, cv.MORPH_OPEN, kernel, iterations = 3)

closing = cv.morphologyEx(opening, cv.MORPH_CLOSE, kernel, iterations = 1)
closing_bool = closing.astype('bool')
cleaned2 = morphology.remove_small_objects(thresh_bool, min_size=300, connectivity=400)
cleaned2_bin = cleaned2.astype('uint8')
image2 = (cleaned2_bin)*255

# Detected circles

circles = np.uint16(np.around(circles))

"""
Parameters 1 and 2 don't affect accuracy as such, more reliability.
Param 1 will set the sensitivity; how strong the edges of the circles need to be.
Too high and it won't detect anything, too low and it will find too much clutter.
Param 2 will set how many edge points it needs to find to declare that it's found a circle.
Again, too high will detect nothing, too low will declare anything to be a circle.
The ideal value of param 2 will be related to the circumference of the circles.
"""

#Drawing circles

detected = cv.cvtColor(crop_img,cv.COLOR_GRAY2BGR)

for i in circles[0,:]:
#   draw    the outer   circle
cv.circle(detected,(i[0],i[1]),i[2],(0,255,0),1)
#   draw    the center  of  the circle
cv.circle(detected,(i[0],i[1]),2,(0,0,255),3)

#Show img
"""
cv.imshow("detected", detected)
cv.waitKey(0)
cv.destroyWindow("detected")
"""

#Save image

cv.imwrite("detected.jpg", detected)


C:\fakepath\detected.jpg In the picture you can see that it clearly detects the bubble correctly but then it detects is plenty more time.

 2 None supra56 943 ●9 ●6

### How to remove multiple hits on detection?

Normaly houghtransfer uses mindistance between 2 circle centers but this does not work. included is my code and one of my lab results. I use multiple morphological steps to enhance the result.

My code:

# -- coding: utf-8 --

""" Created on Mon Mar 2 14:22:03 2020

@author: Fabio Mirisola """

import numpy as np
import cv2 as cv
from skimage import morphology

# Import image

# Import background

# Subtracting background from data
cv_subt = cv.subtract(data,background)

# Cropping the image
Xcoord = 350
YCoord = 250
Width = 1330
Height = 1330
crop_img = cv_subt[YCoord:YCoord+Height, Xcoord:Xcoord+Width]
ret,thresh = cv.threshold(crop_img,25,255, cv.THRESH_BINARY)

# Removing small pixels
thresh_bool = thresh.astype('bool')
cleaned = morphology.remove_small_objects(thresh_bool, min_size=70, connectivity=5)
im_bin = cleaned.astype('uint8')
image = (im_bin)*255

# Inversing the image
ret,inverse = cv.threshold(image,5,255, cv.THRESH_BINARY_INV)

# Opening the holes
kernel = cv.getStructuringElement(shape=cv.MORPH_RECT, ksize=(4,4))
opening = cv.morphologyEx(inverse, cv.MORPH_OPEN, kernel, iterations = 3)

closing = cv.morphologyEx(opening, cv.MORPH_CLOSE, kernel, iterations = 1)
closing_bool = closing.astype('bool')
cleaned2 = morphology.remove_small_objects(thresh_bool, min_size=300, connectivity=400)
cleaned2_bin = cleaned2.astype('uint8')
image2 = (cleaned2_bin)*255

# Detected circles

circles = np.uint16(np.around(circles))

"""
Parameters 1 and 2 don't affect accuracy as such, more reliability.
Param 1 will set the sensitivity; how strong the edges of the circles need to be.
Too high and it won't detect anything, too low and it will find too much clutter.
Param 2 will set how many edge points it needs to find to declare that it's found a circle.
Again, too high will detect nothing, too low will declare anything to be a circle.
The ideal value of param 2 will be related to the circumference of the circles.
"""

#Drawing circles

detected = cv.cvtColor(crop_img,cv.COLOR_GRAY2BGR)

for i in circles[0,:]:
#   draw    the outer   circle
cv.circle(detected,(i[0],i[1]),i[2],(0,255,0),1)
#   draw    the center  of  the circle
cv.circle(detected,(i[0],i[1]),2,(0,0,255),3)

#Show img
"""
cv.imshow("detected", detected)
cv.waitKey(0)
cv.destroyWindow("detected")
"""

#Save image

cv.imwrite("detected.jpg", detected)


C:\fakepath\detected.jpg In the picture you can see that it clearly detects the bubble correctly but then it detects is plenty more time.

 3 None supra56 943 ●9 ●6

### How to remove multiple hits on detection?

Normaly houghtransfer uses mindistance between 2 circle centers but this does not work. included is my code and one of my lab results. I use multiple morphological steps to enhance the result.

My code:

# -- # -*- coding: utf-8 --

 -*- """ Created on Mon Mar 2 14:22:03 2020 2020 @author: Fabio Mirisola """ """ import numpy as np import cv2 as cv from skimage import morphology # Import image data = cv.imread("data.tif",cv.IMREAD_GRAYSCALE) # Import background background = cv.imread("background.tif",cv.IMREAD_GRAYSCALE) # Subtracting background from data cv_subt = cv.subtract(data,background) # Cropping the image Xcoord = 350 YCoord = 250 Width = 1330 Height = 1330 crop_img = cv_subt[YCoord:YCoord+Height, Xcoord:Xcoord+Width] ret,thresh = cv.threshold(crop_img,25,255, cv.THRESH_BINARY) # Removing small pixels thresh_bool = thresh.astype('bool') cleaned = morphology.remove_small_objects(thresh_bool, min_size=70, connectivity=5) im_bin = cleaned.astype('uint8') image = (im_bin)*255 # Inversing the image ret,inverse = cv.threshold(image,5,255, cv.THRESH_BINARY_INV) # Opening the holes kernel = cv.getStructuringElement(shape=cv.MORPH_RECT, ksize=(4,4)) opening = cv.morphologyEx(inverse, cv.MORPH_OPEN, kernel, iterations = 3) closing = cv.morphologyEx(opening, cv.MORPH_CLOSE, kernel, iterations = 1) closing_bool = closing.astype('bool') cleaned2 = morphology.remove_small_objects(thresh_bool, min_size=300, connectivity=400) cleaned2_bin = cleaned2.astype('uint8') image2 = (cleaned2_bin)*255 # Detected circles circles = cv.HoughCircles(image2,3,cv.HOUGH_GRADIENT,1,30,param1=140,param2=45,minRadius=10,maxRadius=45) circles = np.uint16(np.around(circles)) """ Parameters 1 and 2 don't affect accuracy as such, more reliability. Param 1 will set the sensitivity; how strong the edges of the circles need to be. Too high and it won't detect anything, too low and it will find too much clutter. Param 2 will set how many edge points it needs to find to declare that it's found a circle. Again, too high will detect nothing, too low will declare anything to be a circle. The ideal value of param 2 will be related to the circumference of the circles. """ #Drawing circles detected = cv.cvtColor(crop_img,cv.COLOR_GRAY2BGR) for i in circles[0,:]: # draw the outer circle cv.circle(detected,(i[0],i[1]),i[2],(0,255,0),1) # draw the center of the circle cv.circle(detected,(i[0],i[1]),2,(0,0,255),3) #Show img """ cv.imshow("detected", detected) cv.waitKey(0) cv.destroyWindow("detected") """ #Save image cv.imwrite("detected.jpg", detected) In the picture you can see that it clearly detects the bubble correctly but then it detects is plenty more time. 


 4 None updated 2020-03-10 04:15:58 -0500 How to remove multiple hits on detection? Normaly houghtransfer uses mindistance between 2 circle centers but this does not work. included is my code and one of my lab results. I use multiple morphological steps to enhance the result. My code: # -*- coding: utf-8 -*- """ Created on Mon Mar 2 14:22:03 2020 @author: Fabio Mirisola """ import numpy as np import cv2 as cv from skimage import morphology # Import image data = cv.imread("data.tif",cv.IMREAD_GRAYSCALE) # Import background background = cv.imread("background.tif",cv.IMREAD_GRAYSCALE) # Subtracting background from data cv_subt = cv.subtract(data,background) # Cropping the image Xcoord = 350 YCoord = 250 Width = 1330 Height = 1330 crop_img = cv_subt[YCoord:YCoord+Height, Xcoord:Xcoord+Width] ret,thresh = cv.threshold(crop_img,25,255, cv.THRESH_BINARY) # Removing small pixels thresh_bool = thresh.astype('bool') cleaned = morphology.remove_small_objects(thresh_bool, min_size=70, connectivity=5) im_bin = cleaned.astype('uint8') image = (im_bin)*255 # Inversing the image ret,inverse = cv.threshold(image,5,255, cv.THRESH_BINARY_INV) # Opening the holes kernel = cv.getStructuringElement(shape=cv.MORPH_RECT, ksize=(4,4)) opening = cv.morphologyEx(inverse, cv.MORPH_OPEN, kernel, iterations = 3) closing = cv.morphologyEx(opening, cv.MORPH_CLOSE, kernel, iterations = 1) closing_bool = closing.astype('bool') cleaned2 = morphology.remove_small_objects(thresh_bool, min_size=300, connectivity=400) cleaned2_bin = cleaned2.astype('uint8') image2 = (cleaned2_bin)*255 # Detected circles circles = cv.HoughCircles(image2,3,cv.HOUGH_GRADIENT,1,30,param1=140,param2=45,minRadius=10,maxRadius=45) circles = np.uint16(np.around(circles)) """ Parameters 1 and 2 don't affect accuracy as such, more reliability. Param 1 will set the sensitivity; how strong the edges of the circles need to be. Too high and it won't detect anything, too low and it will find too much clutter. Param 2 will set how many edge points it needs to find to declare that it's found a circle. Again, too high will detect nothing, too low will declare anything to be a circle. The ideal value of param 2 will be related to the circumference of the circles. """ #Drawing circles detected = cv.cvtColor(crop_img,cv.COLOR_GRAY2BGR) for i in circles[0,:]: # draw the outer circle cv.circle(detected,(i[0],i[1]),i[2],(0,255,0),1) # draw the center of the circle cv.circle(detected,(i[0],i[1]),2,(0,0,255),3) #Show img """ cv.imshow("detected", detected) cv.waitKey(0) cv.destroyWindow("detected") """ #Save image cv.imwrite("detected.jpg", detected) In the picture you can see that it clearly detects the bubble correctly but then it detects is plenty more time. 5 None updated 2020-03-10 04:21:47 -0500 How to remove multiple hits on detection? Normaly houghtransfer uses mindistance between 2 circle centers but this does not work. included is my code and one of my lab results. I use multiple morphological steps to enhance the result. My code: # -*- coding: utf-8 -*- """ Created on Mon Mar 2 14:22:03 2020 @author: Fabio Mirisola """ import numpy as np import cv2 as cv from skimage import morphology # Import image data = cv.imread("data.tif",cv.IMREAD_GRAYSCALE) # Import background background = cv.imread("background.tif",cv.IMREAD_GRAYSCALE) # Subtracting background from data cv_subt = cv.subtract(data,background) # Cropping the image Xcoord = 350 YCoord = 250 Width = 1330 Height = 1330 crop_img = cv_subt[YCoord:YCoord+Height, Xcoord:Xcoord+Width] ret,thresh = cv.threshold(crop_img,25,255, cv.THRESH_BINARY) # Removing small pixels thresh_bool = thresh.astype('bool') cleaned = morphology.remove_small_objects(thresh_bool, min_size=70, connectivity=5) im_bin = cleaned.astype('uint8') image = (im_bin)*255 # Inversing the image ret,inverse = cv.threshold(image,5,255, cv.THRESH_BINARY_INV) # Opening the holes kernel = cv.getStructuringElement(shape=cv.MORPH_RECT, ksize=(4,4)) opening = cv.morphologyEx(inverse, cv.MORPH_OPEN, kernel, iterations = 3) closing = cv.morphologyEx(opening, cv.MORPH_CLOSE, kernel, iterations = 1) closing_bool = closing.astype('bool') cleaned2 = morphology.remove_small_objects(thresh_bool, min_size=300, connectivity=400) cleaned2_bin = cleaned2.astype('uint8') image2 = (cleaned2_bin)*255 # Detected circles circles = cv.HoughCircles(image2,3,cv.HOUGH_GRADIENT,1,30,param1=140,param2=45,minRadius=10,maxRadius=45) circles = np.uint16(np.around(circles)) """ Parameters 1 and 2 don't affect accuracy as such, more reliability. Param 1 will set the sensitivity; how strong the edges of the circles need to be. Too high and it won't detect anything, too low and it will find too much clutter. Param 2 will set how many edge points it needs to find to declare that it's found a circle. Again, too high will detect nothing, too low will declare anything to be a circle. The ideal value of param 2 will be related to the circumference of the circles. """ #Drawing circles detected = cv.cvtColor(crop_img,cv.COLOR_GRAY2BGR) for i in circles[0,:]: # draw the outer circle cv.circle(detected,(i[0],i[1]),i[2],(0,255,0),1) # draw the center of the circle cv.circle(detected,(i[0],i[1]),2,(0,0,255),3) #Show img """ cv.imshow("detected", detected) cv.waitKey(0) cv.destroyWindow("detected") """ #Save image cv.imwrite("detected.jpg", detected) In the picture you can see that it clearly detects the bubble correctly but then it detects is plenty more time. 6 None updated 2020-03-10 04:23:55 -0500 How to remove multiple hits on detection? Normaly houghtransfer uses mindistance between 2 circle centers but this does not work. included is my code and one of my lab results. I use multiple morphological steps to enhance the result. My code: # -*- coding: utf-8 -*- """ Created on Mon Mar 2 14:22:03 2020 @author: Fabio Mirisola """ import numpy as np import cv2 as cv from skimage import morphology # Import image data = cv.imread("data.tif",cv.IMREAD_GRAYSCALE) # Import background background = cv.imread("background.tif",cv.IMREAD_GRAYSCALE) # Subtracting background from data cv_subt = cv.subtract(data,background) # Cropping the image Xcoord = 350 YCoord = 250 Width = 1330 Height = 1330 crop_img = cv_subt[YCoord:YCoord+Height, Xcoord:Xcoord+Width] ret,thresh = cv.threshold(crop_img,25,255, cv.THRESH_BINARY) # Removing small pixels thresh_bool = thresh.astype('bool') cleaned = morphology.remove_small_objects(thresh_bool, min_size=70, connectivity=5) im_bin = cleaned.astype('uint8') image = (im_bin)*255 # Inversing the image ret,inverse = cv.threshold(image,5,255, cv.THRESH_BINARY_INV) # Opening the holes kernel = cv.getStructuringElement(shape=cv.MORPH_RECT, ksize=(4,4)) opening = cv.morphologyEx(inverse, cv.MORPH_OPEN, kernel, iterations = 3) closing = cv.morphologyEx(opening, cv.MORPH_CLOSE, kernel, iterations = 1) closing_bool = closing.astype('bool') cleaned2 = morphology.remove_small_objects(thresh_bool, min_size=300, connectivity=400) cleaned2_bin = cleaned2.astype('uint8') image2 = (cleaned2_bin)*255 # Detected circles circles = cv.HoughCircles(image2,3,cv.HOUGH_GRADIENT,1,30,param1=140,param2=45,minRadius=10,maxRadius=45) circles = np.uint16(np.around(circles)) """ Parameters 1 and 2 don't affect accuracy as such, more reliability. Param 1 will set the sensitivity; how strong the edges of the circles need to be. Too high and it won't detect anything, too low and it will find too much clutter. Param 2 will set how many edge points it needs to find to declare that it's found a circle. Again, too high will detect nothing, too low will declare anything to be a circle. The ideal value of param 2 will be related to the circumference of the circles. """ #Drawing circles detected = cv.cvtColor(crop_img,cv.COLOR_GRAY2BGR) for i in circles[0,:]: # draw the outer circle cv.circle(detected,(i[0],i[1]),i[2],(0,255,0),1) # draw the center of the circle cv.circle(detected,(i[0],i[1]),2,(0,0,255),3) #Show img """ cv.imshow("detected", detected) cv.waitKey(0) cv.destroyWindow("detected") """ #Save image cv.imwrite("detected.jpg", detected) In the picture you can see that it clearly detects the bubble correctly but then it detects is plenty more time. 7 None updated 2020-03-10 04:27:45 -0500 How to remove multiple hits on detection? Normaly houghtransfer uses mindistance between 2 circle centers but this does not work. included is my code and one of my lab results. I use multiple morphological steps to enhance the result. My code: # -*- coding: utf-8 -*- """ Created on Mon Mar 2 14:22:03 2020 @author: Fabio Mirisola """ import numpy as np import cv2 as cv from skimage import morphology # Import image data = cv.imread("data.tif",cv.IMREAD_GRAYSCALE) # Import background background = cv.imread("background.tif",cv.IMREAD_GRAYSCALE) # Subtracting background from data cv_subt = cv.subtract(data,background) # Cropping the image Xcoord = 350 YCoord = 250 Width = 1330 Height = 1330 crop_img = cv_subt[YCoord:YCoord+Height, Xcoord:Xcoord+Width] ret,thresh = cv.threshold(crop_img,25,255, cv.THRESH_BINARY) # Removing small pixels thresh_bool = thresh.astype('bool') cleaned = morphology.remove_small_objects(thresh_bool, min_size=70, connectivity=5) im_bin = cleaned.astype('uint8') image = (im_bin)*255 # Inversing the image ret,inverse = cv.threshold(image,5,255, cv.THRESH_BINARY_INV) # Opening the holes kernel = cv.getStructuringElement(shape=cv.MORPH_RECT, ksize=(4,4)) opening = cv.morphologyEx(inverse, cv.MORPH_OPEN, kernel, iterations = 3) closing = cv.morphologyEx(opening, cv.MORPH_CLOSE, kernel, iterations = 1) closing_bool = closing.astype('bool') cleaned2 = morphology.remove_small_objects(thresh_bool, min_size=300, connectivity=400) cleaned2_bin = cleaned2.astype('uint8') image2 = (cleaned2_bin)*255 # Detected circles circles = cv.HoughCircles(image2,3,cv.HOUGH_GRADIENT,1,30,param1=140,param2=45,minRadius=10,maxRadius=45) circles = np.uint16(np.around(circles)) """ Parameters 1 and 2 don't affect accuracy as such, more reliability. Param 1 will set the sensitivity; how strong the edges of the circles need to be. Too high and it won't detect anything, too low and it will find too much clutter. Param 2 will set how many edge points it needs to find to declare that it's found a circle. Again, too high will detect nothing, too low will declare anything to be a circle. The ideal value of param 2 will be related to the circumference of the circles. """ #Drawing circles detected = cv.cvtColor(crop_img,cv.COLOR_GRAY2BGR) for i in circles[0,:]: # draw the outer circle cv.circle(detected,(i[0],i[1]),i[2],(0,255,0),1) # draw the center of the circle cv.circle(detected,(i[0],i[1]),2,(0,0,255),3) #Show img """ cv.imshow("detected", detected) cv.waitKey(0) cv.destroyWindow("detected") """ #Save image cv.imwrite("detected.jpg", detected) In the picture you can see that it clearly detects the bubble correctly but then it detects is plenty more time. 


 Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license. about | faq | help | privacy policy | terms of service Powered by Askbot version 0.10.2 Please note: OpenCV answers requires javascript to work properly, please enable javascript in your browser, here is how //IE fix to hide the red margin var noscript = document.getElementsByTagName('noscript')[0]; noscript.style.padding = '0px'; noscript.style.backgroundColor = 'transparent'; askbot['urls']['mark_read_message'] = '/s/messages/markread/'; askbot['urls']['get_tags_by_wildcard'] = '/s/get-tags-by-wildcard/'; askbot['urls']['get_tag_list'] = '/s/get-tag-list/'; askbot['urls']['follow_user'] = '/followit/follow/user/{{userId}}/'; askbot['urls']['unfollow_user'] = '/followit/unfollow/user/{{userId}}/'; askbot['urls']['user_signin'] = '/account/signin/'; askbot['urls']['getEditor'] = '/s/get-editor/'; askbot['urls']['apiGetQuestions'] = '/s/api/get_questions/'; askbot['urls']['ask'] = '/questions/ask/'; askbot['urls']['questions'] = '/questions/'; askbot['settings']['groupsEnabled'] = false; askbot['settings']['static_url'] = '/m/'; askbot['settings']['minSearchWordLength'] = 4; askbot['settings']['mathjaxEnabled'] = false; askbot['settings']['sharingSuffixText'] = ''; askbot['settings']['errorPlacement'] = 'after-label'; askbot['data']['maxCommentLength'] = 800; askbot['settings']['editorType'] = 'markdown'; askbot['settings']['commentsEditorType'] = 'rich\u002Dtext'; askbot['messages']['askYourQuestion'] = 'Ask Your Question'; askbot['messages']['questionSingular'] = 'question'; askbot['messages']['answerSingular'] = 'answer'; askbot['messages']['acceptOwnAnswer'] = 'accept or unaccept your own answer'; askbot['messages']['followQuestions'] = 'follow questions'; askbot['settings']['allowedUploadFileTypes'] = [ "jpg", "jpeg", "gif", "bmp", "png", "tiff" ]; askbot['data']['haveFlashNotifications'] = true; askbot['data']['activeTab'] = 'questions'; askbot['settings']['csrfCookieName'] = 'csrftoken'; askbot['data']['searchUrl'] = ''; /*<![CDATA[*/ $('.mceStatusbar').remove();//a hack to remove the tinyMCE status bar$(document).ready(function(){ // focus input on the search bar endcomment var activeTab = askbot['data']['activeTab']; if (inArray(activeTab, ['users', 'questions', 'tags', 'badges'])) { var searchInput = $('#keywords'); } else if (activeTab === 'ask') { var searchInput =$('#id_title'); } else { var searchInput = undefined; animateHashes(); } if (searchInput) { searchInput.focus(); putCursorAtEnd(searchInput); } var haveFullTextSearchTab = inArray(activeTab, ['questions', 'badges', 'ask']); var haveUserProfilePage = $('body').hasClass('user-profile-page'); if ((haveUserProfilePage || haveFullTextSearchTab) && searchInput && searchInput.length) { var search = new FullTextSearch(); askbot['controllers'] = askbot['controllers'] || {}; askbot['controllers']['fullTextSearch'] = search; search.setSearchUrl(askbot['data']['searchUrl']); if (activeTab === 'ask') { search.setAskButtonEnabled(false); } search.decorate(searchInput); } else if (activeTab === 'tags') { var search = new TagSearch(); search.decorate(searchInput); } if (askbot['data']['userIsAdminOrMod']) {$('body').addClass('admin'); } if (askbot['settings']['groupsEnabled']) { askbot['urls']['add_group'] = "/s/add-group/"; var group_dropdown = new GroupDropdown(); $('.groups-dropdown').append(group_dropdown.getElement()); } var userRep =$('#userToolsNav .reputation'); if (userRep.length) { var showPermsTrigger = new ShowPermsTrigger(); showPermsTrigger.decorate(userRep); } }); if (askbot['data']['haveFlashNotifications']) { $('#validate_email_alert').click(function(){notify.close(true)}) notify.show(); } var langNav =$('.lang-nav'); if (langNav.length) { var nav = new LangNav(); nav.decorate(langNav); } /*]]>*/ //todo - take this out into .js file $(document).ready(function(){$('div.revision div[id^=rev-header-]').bind('click', function(){ var revId = this.id.substr(11); toggleRev(revId); }); lanai.highlightSyntax(); }); function toggleRev(id) { var arrow = $("#rev-arrow-" + id); var visible = arrow.attr("src").indexOf("hide") > -1; if (visible) { var image_path = '/m/default/media/images/expander-arrow-show.gif?v=6'; } else { var image_path = '/m/default/media/images/expander-arrow-hide.gif?v=6'; } image_path = image_path + "?v=6"; arrow.attr("src", image_path);$("#rev-body-" + id).slideToggle("fast"); } for (url_name in askbot['urls']){ askbot['urls'][url_name] = cleanUrl(askbot['urls'][url_name]); }